[ create a new paste ] login | about

Link: http://codepad.org/2FAtURm9    [ raw code | output | fork ]

Perl, pasted on Nov 16:
1
2
3
4
5
6
7
8
9
10
11
12
use strict;

my $str = 'S1,F2  title including several white spaces  (abbr) single,Here<->There,reply';
if($str=~/^S(\d+),F(\d+)\s+(.*?)\((.*?)\)\s+(.*?),(.*?),(.*)$/) {
        print "$1\n";
        print "$2\n";
        print "$3\n";
        print "$4\n";
        print "$5\n";
        print "$6\n";                                                                                                                                                                                          
        print "$7\n";
}


Output:
1
2
3
4
5
6
7
1
2
title including several white spaces  
abbr
single
Here<->There
reply


Create a new paste based on this one


Comments: