Your regex does match your sample string! (But not in the way you want.) A very good reason to use a module.
A Simple fix is:
use strict; use warnings; use English; my $html = '<c:t="AD2343"/><c:p>65677676</c:p>'; $html =~ m{<c:.*/>}; print $MATCH, "\n";
In reply to Re: Regex match last
by BillKSmith
in thread Regex match last
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |