Re: pattern match problem

2003-02-13 Thread ktb
On Thu, Feb 13, 2003 at 04:39:17PM -0800, tao wang wrote: > hi, > > I'm trying to write a script to match a pattern like > this: 1.10 > > I wrote [\d.]+, but this also match with pattern ... > , which has no number in it. Could somebody help me > with it? I'm new to perl and scripts. thank

Re: pattern match problem

2003-02-13 Thread Wiggins d'Anconia
tao wang wrote: hi, I'm trying to write a script to match a pattern like this: 1.10 I wrote [\d.]+, but this also match with pattern ... , which has no number in it. Could somebody help me with it? I'm new to perl and scripts. thanks a lot. \d.\d+ \d+.\d+ \d*.\d* \d+\.+\d+ \d+\.*\d+ \

RE: pattern match problem

2003-02-13 Thread Timothy Johnson
: [EMAIL PROTECTED] Subject: pattern match problem hi, I'm trying to write a script to match a pattern like this: 1.10 I wrote [\d.]+, but this also match with pattern ... , which has no number in it. Could somebody help me with it? I'm new to perl and scripts. thanks a l

RE: pattern match problem

2003-02-13 Thread Wagner, David --- Senior Programmer Analyst --- WGO
tao wang wrote: > hi, > > I'm trying to write a script to match a pattern like > this: 1.10 > > I wrote [\d.]+, but this also match with pattern ... > , which has no number in it. Could somebody help me > with it? I'm new to perl and scripts. thanks a lot. /^\d+\.\d+/ which says ancho

pattern match problem

2003-02-13 Thread tao wang
hi, I'm trying to write a script to match a pattern like this: 1.10 I wrote [\d.]+, but this also match with pattern ... , which has no number in it. Could somebody help me with it? I'm new to perl and scripts. thanks a lot. - tao __ Do

RE: Split and pattern match problem

2001-09-12 Thread Bradshaw, Brian
Thanks for the info I got. I wound up with: @stringT = split(//i, $qText); to do what I needed. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Split and pattern match problem

2001-09-11 Thread Jason Tiller
Hi, Andrea, :) On Wed, 12 Sep 2001, Andrea Holstein wrote: > Jason Tiller wrote: > > # Find the string bounded by "". The '.+?' > > # finds all characters but isn't greedy; ".+" would match all of the > > # characters between the first "". > > # Store this match as $1. > > while( $text =~ /()/

Re: Split and pattern match problem

2001-09-11 Thread Andrea Holstein
Jason Tiller wrote: > ... > #!/usr/bin/perl > > # Store the text you provided in your e-mail as a big string. > $text = < > # Remove new lines, splitting into an array. > @text = split( "\n", $text ); > > # Now weld the string back together, with spaces instead of newlines! > $text = join(

Re: Split and pattern match problem

2001-09-11 Thread Jason Tiller
Hi, Brian, :) I'm by no means a Perl expert, but I was intrigued that you asked a question I *might* actually be able to answer, so here goes: On Tue, 11 Sep 2001, Bradshaw, Brian wrote: > I have a string that I want to substitute words for each > tag. I am pretty sure I want to split the stri

Split and pattern match problem

2001-09-11 Thread Bradshaw, Brian
Hello List, I am hoping I can get some help here. I admit, I am very weak on pattern matches. I have a string that I want to substitute words for each tag. I am pretty sure I want to split the string at the tags, then join pieces with each answer in its proper place. However, I just can't fig