Reputation: 325
I want to select words that have slashes in between them, so not just slashes alone.
I'm using this code: (/.+?/)
, but that doesn't work
Full string:
COOL /RE/
COOL RE
/
I'm trying to get word from first line only. /RE/
Upvotes: 2
Views: 400
Reputation: 3194
Since you mentioned you want "words", I think the pattern would be
/\w+/
If you wanted to only capture the word between the forward slashes, use a capture group:
/(\w+)/
Upvotes: 2