Help for this page

Select Code to Download


  1. or download this
    if ($foo =~ /^$bar$/) { ... }
    if ($foo =~ /^$bar$/i) { ... }
    if ($foo =~ /\A$bar\Z/i) { ... }
    if ($foo =~ /\A$bar\z/i) { ... }
    
  2. or download this
    /^\Q$bar\E\z/i
    
  3. or download this
    if (lc($foo) eq lc($bar)) { ... }