in reply to some regex help
I'm not sure how to go about dynamically creating variables like thisThe recommended alternative is to use a hash, where ABC is a key, rather than a variable name..
Your regexen are fine. For the last example, you should use \w* instead of .*, as the latter will capture whitespace. If your expression should accept embedded whitespace (or other non-\w chars), it gets a little trickier.
The PerlMonk tr/// Advocate
|
---|
In Section
Seekers of Perl Wisdom