reg

G

Guest

I am using regularexpression
I want to allow certain characters including "\"

With the below regularexpression its not allowing??

var charpos = objValue.value.search("[^A-Za-z0-9 _.$:|-\]");

what am i missing??

--
http://pathidotnet.blogspot.com
=====
vInAypAtHi
o__
---_,>/'_------
(_) \(_)
---------------
 
C

Cactus Corp.

I want to allow certain characters including "\"
With the below regularexpression its not allowing??
var charpos = objValue.value.search("[^A-Za-z0-9 _.$:|-\]");

You need to escape the '\' as it's considered itself as the
escaping character for the quotes \"

one to escape the '\':

\\

and another one to escape the quotes :

\"

which will lead you to:

\\\"


antonio
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Staff online

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top