Regular Expression Longes Possible Matching
- by syker
So I have an input string which is a directory addres:
Example: ProgramFiles/Micro/Telephone
And I want to match it against a list of words very strictly:
Example: Tel|Tele|Telephone
I want to match against Telephone and not Tel. Right now my reg looks like this:
my( $output ) = ( $input =~ m/($list)/o );
The regex above will match against…