#!/usr/bin/perl -w use strict; { local $/ = ""; while(<DATA>) { my($word, $string) = $_ =~ /.*(\b\w+)\s*(\(.*\))/s; print "\$word: $word\n"; print "\$string: $string\n"; } } __DATA__ SMSG(could be anything here.) SMSG(And more then one occurrence. And the following @ symbol is sometimes missing) @ JOB2 (AGE=42, NAME=Robert, DATE=@TODAY)
In reply to Re: The last occurrence
by Dietz
in thread The last occurrence
by Scarborough
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |