Before you go too far down this route be forewarned that parsing (arbitrary) HTML with regular expressions is going to be a world of pain. You'll be better served using a real parser (Mojo::DOM or the like).
That being said there's no way that s/^(alt img)// is going to match your sample text since it's ignoring the initial < character on the alt tag.
The cake is a lie.
The cake is a lie.
The cake is a lie.
In reply to Re: How to extract a pattern in Perl regex?
by Fletch
in thread How to extract a pattern in Perl regex?
by SergioQ
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |