in reply to regex pattern matches
You are not grouping the REDIRECTURL element value in if statement, instead grouping only the REDIRECTURL tag. So $1 will have the value as REDIRECTURL U need to change the if statement as
Update:if ($data =~ m|<REDIRECTURL>(.*)</REDIRECTURL>| ) { print "Found: $1\n"; }
As suggested by johngg modified the if statement.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: regex pattern matches
by johngg (Canon) on Aug 22, 2014 at 12:48 UTC | |
|
Re^2: regex pattern matches
by Laurent_R (Canon) on Aug 22, 2014 at 18:48 UTC | |
|
Re^2: regex pattern matches
by argos (Initiate) on Aug 22, 2014 at 12:32 UTC |