Help for this page

Select Code to Download


  1. or download this
    $ perl -le'print "\x{00A0}" =~ /[^\S \n]/ ?1:0;'
    0  # Expected
    ...
    
    $ perl -le'print "\x{2660}\x{00A0}" =~ /[^\S \n]/ ?1:0;'
    0  # Surprised!
    
  2. or download this
    $ perl -le'print "\x{00A0}" =~ /\s(?<![ \n])/ ?1:0;'
    0  # Expected
    ...
    
    $ perl -le'print "\x{2660}\x{00A0}" =~ /\s(?<![ \n])/ ?1:0;'
    1  # Forces the use of an upgraded string.
    
  3. or download this
    $ perl -le'print "\x{00A0}" =~ /[^\S \n]/ ?1:0;'
    0  # Bug kept for backwards compatibility
    ...
    
    $ perl -le'print "\x{2660}\x{00A0}" =~ /[^\S \n]/ ?1:0;'
    1