Re: Extract numbers from in between parentheses with regex

2002-06-27 Thread Kristofer Hoch
Brain, Thanks for the direction! I really need to learn more about regex. I will certainly read those! Kristofer Original Message Follows From: Brian <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: Extract numbers from in between parenthese

Re: Extract numbers from in between parentheses with regex

2002-06-26 Thread Brian
Kristofer, you might want to check out the man page's perlrequick and perlre- I found them pretty useful when I was first learning regex (the man page perlretut isn't bad either). Either way, try this; my $string = '(608)-555-1234'; $string =~ /\((\d+)\)-(\d+)-(\d+)/; this results in $1=608, $2

Re: Extract numbers from in between parentheses with regex

2002-06-26 Thread David T-G
Kristofer -- ...and then Kristofer Hoch said... % % David(s), % Thank you for your help. It works perfectly now. I am adding in both of % y'alls names into my class file for your help. Happy to help! % % % (803 is South Carolina, which should explain the accent on the yall) I know. Less

Re: Extract numbers from in between parentheses with regex

2002-06-26 Thread Kristofer Hoch
t;[EMAIL PROTECTED]> To: perl beginners cgi <[EMAIL PROTECTED]> CC: Kristofer Hoch <[EMAIL PROTECTED]> Subject: Re: Extract numbers from in between parentheses with regex Date: Wed, 26 Jun 2002 14:03:52 -0500 Kristofer -- and then Kristofer Hoch said... % % David, % Thank you

Re: Extract numbers from in between parentheses with regex

2002-06-26 Thread David T-G
Kristofer -- ...and then Kristofer Hoch said... % % David, % Thank you very much for your help. Don't know Utah, I have a lot of % friends from there. The expression you provided is almost what I am after.. % Here is my string. % % my $String = "Characters(803), Value(3)"; % % What I am try

Re: Extract numbers from in between parentheses with regex

2002-06-26 Thread Kristofer Hoch
uot;(803)". Is there a way to get 803 without the enclosing parens? Thank you Kristofer Original Message Follows From: <[EMAIL PROTECTED]> To: "Kristofer Hoch" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> Subject: Re: Extract numbers from in betwe

Re: Extract numbers from in between parentheses with regex

2002-06-26 Thread perl-dvd
stofer Hoch" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, June 26, 2002 10:21 AM Subject: Extract numbers from in between parentheses with regex Hi all, Please forgive the simple nature of this question. I have never really used regular expression extensivly.

Extract numbers from in between parentheses with regex

2002-06-26 Thread Kristofer Hoch
Hi all, Please forgive the simple nature of this question. I have never really used regular expression extensivly. Here goes. I am trying to extract a number from in between two parenthesis. I want the first value I find (from right to left) in a string. These numbers could be phone number