I have a string as
Celcom10 | 105ABCD | Celcom
This is my regex (\s\w+) however this also capture the white space.
How do I write a regex to obtain the middle values 105ABCD excluding the pipe and whitespace ?
I only need a regex pattern since this will be inserted within a diagram which will be executed in an automated test.
\s*[|]\s*, you'll get an array[^\s|]+. But really, please try to clarify your question from the start by giving maximal information. Getting to the "real" question after 7 edits is a pain. Also if you're using some custom program, then why in the world are you asking us on how to get a specific group. Try to search on your own since it's not pure javascript.