Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    
    ...
      {
      /(?|#(\S+)|()\z)/ and print "found '$1' in '$_'\n";
      }
    
  2. or download this
    found 'foo' in '#foo bli bla'
    found 'foo' in 'bli #foo bar baz'
    ...
    found 'one' in 'more than #one is a #string'
    found '' in 'foo bli bla'
    found '' in '# does not match #'