RE: Quick regex prob

2003-01-23 Thread Dan Muey
n > > > Thanks for everyone's help. > > Sander > > -Original Message- > From: Dan Muey [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 23, 2003 1:09 PM > To: Rob Dixon; [EMAIL PROTECTED] > Subject: RE: Quick regex prob > > > >

RE: Quick regex prob

2003-01-23 Thread Liebert, Sander
1:09 PM To: Rob Dixon; [EMAIL PROTECTED] Subject: RE: Quick regex prob > Dan Muey wrote: > > Hiya, I'm having a brain melt right now : > > > > I do this to match one word only. > > m/^(\w+)$/) > > That matches an entire line which is just a string o

RE: Quick regex prob

2003-01-23 Thread Dan Muey
> Dan Muey wrote: > > Hiya, I'm having a brain melt right now : > > > > I do this to match one word only. > > m/^(\w+)$/) > > That matches an entire line which is just a string of 'word' > characters ( A-Z, a-z, 0-9, and underscore ). > > > What regex do I need to match multiple , unkown ammou

Re: Quick regex prob

2003-01-23 Thread Rob Dixon
Dan Muey wrote: > Hiya, I'm having a brain melt right now : > > I do this to match one word only. > m/^(\w+)$/) That matches an entire line which is just a string of 'word' characters ( A-Z, a-z, 0-9, and underscore ). > What regex do I need to match multiple , unkown ammounts of words? > Will th

Quick regex prob

2003-01-23 Thread Dan Muey
Hiya, I'm having a brain melt right now : I do this to match one word only. m/^(\w+)$/) What regex do I need to match multiple , unkown ammounts of words? Will this do it? Or is there a better way? m/^\w[\w*|\s*]\w$/ I know there is but like Isaid my brain stopped for luunch a while ago. Thank

Re: RegEx prob.

2002-09-23 Thread Janek Schleicher
Zielinski Daniel wrote at Mon, 23 Sep 2002 13:53:54 +0200: > Got following problem: > > Want to substitute roman digits (I...) with arabic(1...): > > $corr_line="Vol. I, parte speciale" (example, position of I may > vary) > $corr_line=~s/(>| |,|;)I( |,|;|:|\n)/$11$2/; > > I think that I have t

Re: RegEx prob.

2002-09-23 Thread Jeff 'japhy' Pinyan
On Sep 23, Zielinski Daniel (P) said: >$corr_line=~s/(>| |,|;)I( |,|;|:|\n)/$11$2/; Perl sees "$11$2" as two variables -- $11 and $2. You want "${1}1$2", which makes Perl separate the $1 from the 1. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia bro

RegEx prob.

2002-09-23 Thread Zielinski Daniel (P)
Hi! Got following problem: Want to substitute roman digits (I...) with arabic(1...): $corr_line="Vol. I, parte speciale" (example, position of I may vary) $corr_line=~s/(>| |,|;)I( |,|;|:|\n)/$11$2/; I think that I have to interpolate the variables but don't know how. Can anybody give me a hin

RE: RegEx Prob WAS: Problem with reading string

2001-05-01 Thread J. Patrick Lanigan
I just keep learning. This list is making learning much easier. Thanks to Dan and Jason, Patrick > you need the global modifier .. what you're trying to do is do the current > match globally throughout the whole string (not zero or more) > > $mystring =~ s/\'/\\'/g;

RE: RegEx Prob WAS: Problem with reading string

2001-05-01 Thread King, Jason
J. Patrick Lanigan writes .. >> I was using: >> >> $mystring =~ s/\'/\\'/; >> >> ...to replace ' with \' in $mystring. It was working find I >> thought, until I >> encountered a string with multiple apostrophies. How do I replace >> 0 or more? >> >> Ex: >> >> "No More 'I Love You's'" >

RegEx Prob WAS: Problem with reading string

2001-05-01 Thread J. Patrick Lanigan
Opps, I forgot to change the subject. I think I need to get outside and get some fresh air. > I was using: > > $mystring =~ s/\'/\\'/; > > ...to replace ' with \' in $mystring. It was working find I > thought, until I > encountered a string with multiple apostrophies. How do I replace > 0 or