in reply to The last occurrence

$sting =~ m{\b # word boundary ( \S+ # word before '(' \s* # spaces if any \( [^\)]+ # '(' inside of ')' \) ) [^\)]* # some not ')' chars if any $ # end of string ancor }x; $result = $1;

Upd: comments added

Replies are listed 'Best First'.
Re^2: The last occurrence
by Scarborough (Hermit) on Jul 20, 2004 at 13:45 UTC
    Thank you for your help this worked but gave me the whole thing in one string but it only took a momment to get what I needed from this, you have saved me a lot of time
    thanks again