in reply to Need help using regex to extract multiple matches
This is probably easy. If you show some work, you might get better answers. This *might* do the trick, run on a file containing the web page from the command line. If you’re on WIN, you might need to reverse/escape the quotes.
perl -0nE 'say join "\n", /data-src-hq="([^"]+)/g' {filename}
That is not robust and comes with caveats but it’s the kind of thing that might fit your problem. Assuming you described your problem properly and your data is tame. :P It’s also overly terse for a good example. If you provide a full skeleton of what you’re already doing with sample data, you’ll likely get a better solution with less idiomatic Perl involved.
|
|---|