in reply to regular expressions
orif ($amourss =~ /^a.+[fg]$/) { }
Assuming you're doing a test and not trying to return part of the motif. EDIT: The example given above is inefficient because it uses (f|g) instead of (?:f|g), requiring the regex to return this part of the match as $1 when not needed.if ($amourss =~ /^a.+(?:f|g)$/) { }
|
|---|