faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 2 people (100%) answered Yes
Recently 2 of 2 people (100%) answered Yes

Entry

How to match the character . using regular expression

Apr 6th, 2008 19:49
ha mo, Jean-Bernard Valentaten, Gurudev Prasanna,


Have you already tried escaping the char??
There are several characters, that are very special to regular exp., 
these need to be escaped (by a leading backslash).
If you want to match a "." and replace it whereever it appears in a 
string, something like
  s/'\.'//g
should do the trick (that is perl-notation however, so you'll have to 
ckeck how js notates it)
HTH,
Jean
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com