Re: search and replace using regex

2003-12-05 Thread R. Joseph Newton
drieux wrote: > Or we might use say > > $_ =~ s|\s*_<|<|g; > > to clean out the preceeding 'white space'... > > ciao > drieux I don't think so. That would be profoundly rude. One of the traditional courtesies of the HTML protocols was [it is now, like most courtesy , honored more in the

Re: search and replace using regex

2003-12-03 Thread drieux
On Dec 3, 2003, at 7:06 AM, Rob Dixon wrote: [..] remember that those double quotes will allow things to be 'interpolated' - which is not what you want. No they won't: they're not string delimiters in this context so they'll be treated as any other non-special character between the real s/// slash

Re: search and replace using regex

2003-12-03 Thread Rob Dixon
Saskia Van Der Elst wrote: > > I have trouble executing a search and replace through all files in a certain > directory. > > I want to replace " _ > Can I match a white-space? > > I have tried the following regex: > > s/ _\

Re: search and replace using regex

2003-12-03 Thread Rob Dixon
Drieux wrote: > > On Dec 3, 2003, at 12:25 PM, Saskia van der Elst wrote: > > > I have trouble executing a search and replace through all files in a > > certain > > directory. > > > > I want to replace " _ > > > Can I match a white-space? > > > > I have tried the following regex: > > > > s/ _\ [..]

Re: search and replace using regex

2003-12-02 Thread drieux
On Dec 3, 2003, at 12:25 PM, Saskia van der Elst wrote: I have trouble executing a search and replace through all files in a certain directory. I want to replace " _ Can I match a white-space? I have tried the following regex: s/ _\[..] I agree with Tom that you get better mileage by putting

RE: search and replace using regex

2003-12-02 Thread Tom Kinzer
You may want to start looking at some XML parsing modules, but assuming this is a quickie, I can point out that your problem is starting with the use of forward slash. Remember: your forward slash is your separator for the regular exp. Try replacing it with something else like | or % and go from