How Return Group 1 via RegEx, not full match

5,500 views
Skip to first unread message

HackerMan

unread,
Nov 10, 2017, 3:50:01 PM11/10/17
to Web Scraper
I'm working with the regular expressions option and it looks like webscraper.io only returns the full match. I need group 1 to be returned, not the full match. There must be a way to do this. 

RegEx: title="(.*?)"

Example String:  <span class="ui_bubble_rating bubble_50"></span><span class="ratingDate relativeDate" title="November 5, 2017">Reviewed 5 days ago </span>

Result from webscraper: title="November 5, 2017"

Obviously the goal is to only capture: November 5, 2017 ... this is group 1 of the provided RegEx. The full match is what is currently being returned. Am I missing something here? Is it possible to return group 1. Without that capability the Regex is really limited. 

Thanks!

Denis Bakhtenkov

unread,
Nov 13, 2017, 6:14:15 AM11/13/17
to Web Scraper
In this case I would use "Element attribute" selector with attribute "title".
But you can also use a regular expression with a positive look back and forth, for example:

(?<=title=")(.+)(?=")


пятница, 10 ноября 2017 г., 23:50:01 UTC+3 пользователь HackerMan написал:
Reply all
Reply to author
Forward
0 new messages