[Dorset] Slight OT: Regular Expressions in Winblows

2011-02-21 Thread Terry Coles
Hi, I wanted to search and relace a string of the form '_' (eg _4023) in a large text file at work today. I'm not skilled in the art of constructing Regular Expressions, so I went on the web and researched what I needed to type. Simple I thought; the expression I want is '_[0-9]{4}'. How

Re: [Dorset] Slight OT: Regular Expressions in Winblows

2011-02-21 Thread Ralph Corderoy
Hi Terry, > Simple I thought; the expression I want is '_[0-9]{4}'. However, the > only thing I could get to work, using Notepad++ and MS Visual Studio > Find tools, was '_[0-9][0-9][0-9][0-9]'. Here at home I can get my > original expression t o work in Kate, but not in Notepad++ running > und

Re: [Dorset] Slight OT: Regular Expressions in Winblows

2011-02-21 Thread Terry Coles
On Monday 21 Feb 2011, Ralph Corderoy wrote: > History. Regular expressions were introduced to text processing by Ken > Thompson who we recently mentioned. The syntax has evolved a bit by > then and there are variations today. Your regexp could be written as > > _[0-9][0-9][0-9][0-9] >

Re: [Dorset] Belkin wireless USB

2011-02-21 Thread Tim Allen
Hi Peter On 19/02/11 18:09, Peter Merchant wrote: My ZYxel wireless USB stick has been working at 16% signal strength, and my neighbour suggested that I try a Belkin one as he had a good signal (albeit on W7). I borrowed a Belkin F5D7050 which is quite an old one and I get a marvelous 42% stren

Re: [Dorset] Slight OT: Regular Expressions in Winblows

2011-02-21 Thread jr
On 21 February 2011 17:41, Terry Coles wrote: > However, I still can't see why [0-9]{4} works in nano, but nothing I do will > allow me to search for 4 digits preceded by an underscore.  Is underscore a > special char in some implementations? not as far as I know, have you tried escaping the char

Re: [Dorset] Slight OT: Regular Expressions in Winblows

2011-02-21 Thread Terry Coles
On Monday 21 Feb 2011, jr wrote: > On 21 February 2011 17:41, Terry Coles wrote: > > However, I still can't see why [0-9]{4} works in nano, but nothing I do > > will allow me to search for 4 digits preceded by an underscore. Is > > underscore a special char in some implementations? > > not as fa

Re: [Dorset] Slight OT: Regular Expressions in Winblows

2011-02-21 Thread Ralph Corderoy
Hi Terry, > However, I still can't see why [0-9]{4} works in nano, but nothing I > do will allow me to search for 4 digits preceded by an underscore. Is > underscore a special char in some implementations? No. Could it be that /[0-9]{4}/ worked because you were telling nano you were searching

Re: [Dorset] Slight OT: Regular Expressions in Winblows

2011-02-21 Thread Terry Coles
On Monday 21 Feb 2011, Ralph Corderoy wrote: > No. Could it be that /[0-9]{4}/ worked because you were telling nano > you were searching for a regexp with M-R, but when you tried /_[0-9]{4}/ > you forgot to do that? The prompt for the search string says whether > it's expecting a regexp or not.

Re: [Dorset] Slight OT: Regular Expressions in Winblows

2011-02-21 Thread John Cooper
On 21/02/11 16:54, Terry Coles wrote: Hi, I wanted to search and relace a string of the form '_' (eg _4023) in a large text file at work today. I'm not skilled in the art of constructing Regular Expressions, so I went on the web and researched what I needed to type. Simple I thought; the e

Re: [Dorset] Slight OT: Regular Expressions in Winblows

2011-02-21 Thread Keith Edmunds
On Mon, 21 Feb 2011 21:21:14 +, l...@discoverlinux.co.uk said: > In vi > > :1,$s/_[0-9][0-9][0-9][0-9]/found/g In case it isn't clear, Vim is available on Windows as well. I know Vim isn't everyone's cup of tea (for some inexplicable reason), but good to know that there is a powerful editor

Re: [Dorset] Slight OT: Regular Expressions in Winblows

2011-02-21 Thread jr
On 21 February 2011 21:38, Keith Edmunds wrote: > On Mon, 21 Feb 2011 21:21:14 +, l...@discoverlinux.co.uk said: > >> In vi >> >> :1,$s/_[0-9][0-9][0-9][0-9]/found/g > > In case it isn't clear, Vim is available on Windows as well. I know Vim > isn't everyone's cup of tea (for some inexplicable

Re: [Dorset] Slight OT: Regular Expressions in Winblows

2011-02-21 Thread Andrew Reid Paterson
On Monday, February 21, 2011 09:38:24 pm Keith Edmunds wrote: > On Mon, 21 Feb 2011 21:21:14 +, l...@discoverlinux.co.uk said: > > In vi > > > > :1,$s/_[0-9][0-9][0-9][0-9]/found/g > > In case it isn't clear, Vim is available on Windows as well. I know Vim > isn't everyone's cup of tea (for s

Re: [Dorset] Belkin wireless USB

2011-02-21 Thread Peter Merchant
On Mon, 2011-02-21 at 17:42 +, Tim Allen wrote: > Hi Peter > > On 19/02/11 18:09, Peter Merchant wrote: > > My ZYxel wireless USB stick has been working at 16% signal strength, and > > my neighbour suggested that I try a Belkin one as he had a good signal > > (albeit on W7). > > > > I borrowed