Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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

by davido (Cardinal)
on Jan 12, 2021 at 18:50 UTC ( #11126815=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11126815]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2021-03-01 10:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?