Reputation: 1735
If I have a string like so: <Hello> < World>
I would like to match Hello
but ignore World
due to the whitespace.
So far I'm using this, /\<(.*?)\>/g
but this returns both Hello
and World
. I would like to ignore any in-bracket words that contain any whitespace at all.
Upvotes: 0
Views: 79
Reputation: 46323
\S
is the qualifier for non-whitespace character. Use this:
/\<(\S*?)\>/g
Upvotes: 0