I have a variable that can contain strings such as "New_Features/Some_other_folder". I'm currently using the following match:
if($foo =~ 'Old_Archive') { print "do something"; }I was wondering if the =~ operator is the fastest and most efficient solution for this sort of matching, or if I should be using a Regex and, if so, which. I basically need to match any string that contains "Old_Archive" or "Old_Archive/something_else" or "Old_Archive/something_else/yet_another_path".
I would also appreciate if you can provide me with a good reference for regular expressions since I'm a little out of practice with them.
Thanks,
Ralph
In reply to Best method for matching strings by ralphch
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |