Hello,
I have a great regex for extracting hrefs from a web page, but I can not figure out where I can insert one of my submatch conditions.
Here is the regex that matches the href link.
and here is another regex that matches part of the link:
Where in the first regex do I enter this one in order to get the following submatch?
Text: <html><a href=""http://cgi.ebay.com/YAMAZAKI-Gold-Accent-CARA-Soup-Spoon-Spoons-NEW_W0QQitemZ4358700777QQcategoryZ38242QQrdZ1QQcmdZViewItem""></html>
Match: http://cgi.ebay.com/YAMAZAKI-Gold-A...358700777QQcategoryZ38242QQrdZ1QQcmdZViewItem
SubMatch: 4358700777
Thanks in advance,
Chuck
I have a great regex for extracting hrefs from a web page, but I can not figure out where I can insert one of my submatch conditions.
Here is the regex that matches the href link.
Code:
(?:[hH][rR][eE][fF]\s*=)(?:[\s""']*)(?!#|[Mm]ailto|[lL]ocation.|[jJ]avascript|.*css|.*this\.)(.*?)(?:[\s>""'])
and here is another regex that matches part of the link:
Code:
W0QQitemZ([0-9]{5,10})QQ
Where in the first regex do I enter this one in order to get the following submatch?
Text: <html><a href=""http://cgi.ebay.com/YAMAZAKI-Gold-Accent-CARA-Soup-Spoon-Spoons-NEW_W0QQitemZ4358700777QQcategoryZ38242QQrdZ1QQcmdZViewItem""></html>
Match: http://cgi.ebay.com/YAMAZAKI-Gold-A...358700777QQcategoryZ38242QQrdZ1QQcmdZViewItem
SubMatch: 4358700777
Thanks in advance,
Chuck