From: David Kastrup Date: 2006-12-07T09:25:09+09:00 Subject: Re: Why is this regex invalid? Christopher Schneider writes: > I'm pretty sure the dash needs to be escaped in regular expressions. > The second one works since it is the last character in the character > class, and hence isn't defining a range. > > /([0-9]*)([^\+\- ]+)(.*)/ should work - note the escaped dash. Rubbish. In character ranges, \ is not special. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum