topical media & game development

talk show tell print

basic-regex-26-MatchInsensitive.pl / pl



  #!/usr/bin/perl -w
  use strict;
  print "Enter a string. It will be matched against the pattern '/Star/i'.\n\n";
  my myTestString = <STDIN>;
  my myLength = length(myTestString);
  chomp(myTestString);
  if (myTestString =~ m/Star/i)
  {
   print "There is a match for 'myTestString'.";
  }
  else
  {
   print "No match was found in 'myTestString'.";
  }


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.