Perl Regular Expression query

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
uggers2k
Forum Newbie
Posts: 5
Joined: Sat Aug 29, 2009 7:12 am

Perl Regular Expression query

Post by uggers2k »

Hi all

I am receiving a variable and it is in the following format:
$name = "Jim James (jjames)"

What I would like is some example code in perl to extract all characters between the ( ) and store in another variable.

So in the example above jjames would be stored in the variable.

I can do this in PHP using preg_match, but I need to do it in Perl also.

Thanks all

Uggers (Oracle DBA learning Regular Expressions)
uggers2k
Forum Newbie
Posts: 5
Joined: Sat Aug 29, 2009 7:12 am

Re: Perl Regular Expression query

Post by uggers2k »

Now sorted
Post Reply