Help for this page

Select Code to Download


  1. or download this
    $string = 'My Test Data';
    $regex = '(?i)\btest\b';
    print $string =~ m/$regex/ ? "Match\n" : "No match\n";
    
  2. or download this
    $string = 'My Test Data';
    $regex = '(?i)\btest\b';
    print $string =~ $regex ? "Match\n" : "No match\n";