Help for this page

Select Code to Download


  1. or download this
    @strings = ('A A C D','A A/B C D','A/B A C D','A/B A/B C D');
    foreach $string (@strings) {
      ($third) = $string =~ m/(?:A|A\/B) (?:A|A/B) (\w+) \w+/;
      printf "%s - %s\n", $string, $third
    }
    
  2. or download this
    A A C D - C
    A A/B C D - C
    A/B A C D - C
    A/B A/B C D - C