Help for this page

Select Code to Download


  1. or download this
    $string = 'My Test Data';
    $regex = 'm/\btest\b/i';
    if ($string =~ $regex){print "It Works!\n"}else{print "No joy!\n"};
    
  2. or download this
    $string = 'My Test Data';
    $regex = 'm/\bTest\b/i';
    $stmt = 'if ($string =~ $regex){print "It Works!\n"}else{print "No joy
    +!\n"}';
    eval $stmt;