http://qs321.pair.com?node_id=11126815


in reply to I match a pattern in regex, yet I don't get the group I wanted to extract for some reason

Whoever gave you the impression that regular expressions are the tool of choice for parsing HTML documents did you a tremendous disservice. You should use a proper HTML / DOM parsing class. If your intent is to learn to wield regular expressions, sure, have some fun with it. If your intent is to get the job done, use the tool that is designed for the job. Mojo::DOM is my preferred solution for this sort of problem. But there are many others on CPAN too.


Dave

  • Comment on Re: I match a pattern in regex, yet I don't get the group I wanted to extract for some reason