Hi,
I need a regex to catch the second word of a sentence.
I'm pretty much a newbie, I'm learning regexes step by step...
Any help welcome !
Thanks a lot !
I need a regex to catch the second word of a sentence.
I'm pretty much a newbie, I'm learning regexes step by step...
Any help welcome !
Thanks a lot !
Try this to capture the second word of your string.
Code: Select all
Should return "quick" for the string "The quick brown fox."/(?:\S+\s+){1}(\S+)/
Here there is another way: