Help for this page

Select Code to Download


  1. or download this
    if ('foo 123 bar' =~ /(\d+)/) {
        print("$1\n");
    }
    
  2. or download this
    123
    
  3. or download this
    for (1..2) {
       if ('ab' =~ /a/g) {
    ...
           print("no match\n");
       }
    }
    
  4. or download this
    match
    no match
    
  5. or download this
    for (1..2) {
       if ('ab' =~ /a/) {
    ...
           print("no match\n");
       }
    }
    
  6. or download this
    match
    match