[Israel.pm] regular expressions problem
Afgin Shlomit
vshlomit at weizmann.ac.il
Thu Feb 26 05:10:48 PST 2004
I'm trying to break the string to few substing.
I have one string that look like :
$str = "Title/Function: stam balalam
lhgfldddl lhflghdl lkdgldflgjd
bla bla bal
Status: write status here
write
status
here
Suggested Meetings:
jg jgkfj jglfdjlgjkdf
ljgldfjl fd
fg o;
Comments: kjk k
kkk ll
gghghg
";
I want to keep each title in different variable so I tried:
$str =~ /^(Title\/Function:\s+((.|\n)+))*(Status:\s+((.|\n)+))*(Suggested
Meetings:\s+((.|\n)+))*(Comments:\s+((.|\n)+))*$/;
print " $1\n $2\n $3\n $4\n $5\n $6";
I get in $1 all the $str. How I need to change my regular expresion so I
can get the words that apear after the titles
Thanks,
Shlomit.
More information about the Perl
mailing list