Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Regex, queryby dmsparts (Sexton) |
on Jan 24, 2013 at 15:48 UTC ( [id://1015188]=perlquestion: print w/replies, xml ) | Need Help?? |
dmsparts has asked for the wisdom of the Perl Monks concerning the following question: HI, i am trying to create a variable which contains a reference number matched from within a text string. example, textstring = Michael please look at E123456 where E123456 is a reference number i need to look at. i want this reference number to be added to a variable called $lookatref. The string is always in the same format, NAME please look at REF. The ref can be either one letter followed by 6 numbers or just 7 numbers the code im using is
$reqtext is the text i want to match. this is read into the variable earlier in the script. i think it is something to do with the regex syntax, but i just cant figure out what it wrong.
Back to
Seekers of Perl Wisdom
|
|