I want to extract URLs from text such as this:
this is text
bla bla bla
http://dev.pricewombat.com/d/4
http://www.pricewombat.com/d/12/Spalding-Premier-Excel-Basketball-15-Free-Store-Pickup
I wrote the following regex:
^(https?:\/\/(dev|www).pricewombat.com\/d\/[^ \n]+)$
http://regex101.com/r/iJ1fZ0/1
However, if you notice I'm using alternation for (dev|www)
and because parenthesis are used it creates a capture group where I don't want one.
Is it possible to use alternation without creating a capture group?
Note that this is not the same question as this "similar question": Can I use an OR in regex without capturing what's enclosed?
EDIT: Apparently it actually is the same question as the one above, I simply misunderstood how the ?:
operator works.