My requirement is to include the matching if clause in a loop into which I feed a list of patterns. I have looked through a lot of regex documentation, and this is not mentioned... perhaps not surprisingly ;-)$regex1 = (hello); $test="hello there!"; if ($test =~ /$regex1/) { print $1; }
In reply to Storing Regex Patterns in Scalars by iana
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |