Re: Reg Expression missing last char?

2003-09-18 Thread Carl Jolley
On Wed, 17 Sep 2003, Capacio, Paula J wrote: I am using $1 and $2 to retain data from a matched regular expression. I expect $1 to contain the KEY ID and $2 to contain USER NAME, but $2 is missing the last character. See the code and results below. (watch out for text line wrapping) Thanks

Re: Reg Expression missing last char?

2003-09-18 Thread Adam Ingerman
On Thu, 18 Sep 2003 06:43, Capacio, Paula J wrote: Thanks Bill, Rob and David! I didn't pickup on $1 getting too much of the match. I guess the lesson there is when printing the results, I should have delimited them with either words or characters, (like you did) then I would've noticed it.

Re: Reg Expression missing last char?

2003-09-18 Thread $Bill Luebkert
Adam Ingerman wrote: when debugging, I tend to be more direct in variable checking, this might be evern better for you (add another \n if it's liable to be a long line, and change the ' to another character if need be) print \$1\t'$1'\n\$2\t'$2'\n\$3\t'$3'\n; sure, it doesn't look much

RE: Reg Expression missing last char?

2003-09-17 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Capacio, Paula J wrote: I am using $1 and $2 to retain data from a matched regular expression. I expect $1 to contain the KEY ID and $2 to contain USER NAME, but $2 Pauls, If you put a slash between $1 and $2, you will find out that it is not doing what you think. You will find that $1

Re: Reg Expression missing last char?

2003-09-17 Thread Capacio, Paula J
Thanks Bill, Rob and David! I didn't pickup on $1 getting too much of the match. I guess the lesson there is when printing the results, I should have delimited them with either words or characters, (like you did) then I would've noticed it. print Expression matched and retained: $1 and $2\n;