AI Features

Regex Operators

Learn about the use of different regex operators in Perl.

Match and binding operators

A regex can be as simple as a substring pattern:

Perl
my $name = 'Chatfield';
say 'Found a hat!' if $name =~ /hat/;

The match operator (m/ /, abbreviated / /) ...