Hello guys. Im trying to write a Regex formula, that would extract text from a View page source page of a website. The webpage and the data that I need looks like this:
The regex that I have now looks like below:
Regex.Match(strScriptText,"(?<=impressions':)[\s\S]+?\]").Value
The thing is, that my regex doesn’t work. I’m hoping to get some advice for it to work. Thanks
Anil_G
(Anil Gorthi)
May 29, 2023, 7:46am
2
@Povilas_Jonikas
Please try this
Regex.Match(strScriptText,"(?<=impressions').*",RegexOptions.MultiLine).Value
cheers
1 Like
Will try in a bit and let you know. Thanks for the help in advance!
1 Like
Yoichi
(Yoichi)
May 29, 2023, 7:50am
4
HI,
It seems lack of whitespace before colon. Can you try the following expression?
Regex.Match(strScriptText,"(?<=impressions'\s*:)[\s\S]+?\]").Value
Regards,
1 Like
system
(system)
Closed
June 1, 2023, 7:51am
5
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.