Help for this page

Select Code to Download


  1. or download this
    $string =~ /((\w|'|-)+)/g
    
  2. or download this
    $string =~ /([-\w']+)/g
    
  3. or download this
    $string =~ /(\w+[-']?\w+)/g
    
  4. or download this
    $string =~ /(\w+[-']?\w+|\w)/g
    
  5. or download this
    #!/usr/local/bin/perl
    
    ...
    This is a sentence with words that're different from other words.  
    They have apostrophes in them (') and dashes, or dash-like characters
    (-).