Hi All
I am trying to extract all instances of the links part /the-team/letters/
href="/the-team/A-B/"
href="/the-team/A-V-K-P/"
href="/the-team/B-P/"
href="/the-team/B-P-O/"
the regex I am trying /the-team/\w+(?:-\w+)/ does capture only if I have two letters divided by a hyphen (/the-team/A-B/ and /the-team/B-P/)
which expression will bring me all links?
thank you
Solved! Go to Solution.
Hey @xariet, the following will capture everything up until the next / which will allow you to capture all letters. Unless there's any other scenarios where you don't want to capture this part?
the-team\/([^/]+)
Your RegEx is really close, all you would need to do is move the + outside your non-capturing group
/the-team/\w+(?:-\w)+/