Symbol |
Explanation |
Example |
=~ |
Compare string with a regular expression. |
|
!~ |
Negated form of =~ |
|
/ |
Delimiter |
|
m |
Match operator. |
if ($browser =~ m/MSIE/) {.... |
[....] |
a class of characters between the square brackets. |
|
^ |
Beginning of line symbol. |
|
[^....] |
At the start of a class means NOT. |
|
$ |
End of line symbol. |
|
i |
Case insensitiviy. |
|
\b |
At start or end of word, according to its position. |
matches free-standing word: /\bword\b/ |
\B |
Not at start or end of word, according to its position. |
|
\g |
At end of pattern to save all matches. |
=~ m/pattern/g |