Re: Regexp in PERL

2008-09-10 Thread anders
> > $line =~ s/" ([0-9])/"$1/g; > Thanks this solve the problem for me. Anders -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Regexp in PERL

2008-09-10 Thread Hridyesh Pant
$string =" 234234"; $string =~ s/(\s*)(?=\d+)//g; print ("$string"); anders wrote: Hi i have som text with " and space and then a numbers eg. " 234234 I tested to write $line =~ s/\" [0-9]/[0-9]/g; I like it to change " 234 to "234 But it made "[0-9] Anyone how should i have write to tel

Re: Regexp in PERL

2008-09-09 Thread John W. Krahn
anders wrote: Hi i have som text with " and space and then a numbers eg. " 234234 I tested to write $line =~ s/\" [0-9]/[0-9]/g; I like it to change " 234 to "234 But it made "[0-9] Anyone how should i have write to tell it to find and convert corrent. $line =~ s/(?<=") +(?=[0-9])//g;

Re: Regexp in PERL

2008-09-09 Thread Jeff Pang
2008/9/10 anders <[EMAIL PROTECTED]>: > Hi i have som text with " and space and then a numbers > eg. > " 234234 > > I tested to write > $line =~ s/\" [0-9]/[0-9]/g; > > I like it to change > " 234 to "234 > If you just want to remove the space between " and numbers, try: $line =~ s/\s+//; --

Regexp in PERL

2008-09-09 Thread anders
Hi i have som text with " and space and then a numbers eg. " 234234 I tested to write $line =~ s/\" [0-9]/[0-9]/g; I like it to change " 234 to "234 But it made "[0-9] Anyone how should i have write to tell it to find and convert corrent. Best regards Anders -- To unsubscribe, e-mail: [