Help for this page

Select Code to Download


  1. or download this
    $s = "1-6,27,105-170,512,670-675";;
    
    ...
    105 170
    512 512
    670 675
    
  2. or download this
    qr[
        ^\s*                       ## from the start of the string, skip w
    +hitespace (if any)  
    ...
        )*                         ## zero or more times
        \s*$                       ## to the end of string, optionally ski
    +pping whitespace if any
    ]x