RE:INPUT FIELD ACCEPT ONLY SPECIAL CHARACTERS Apostrophe (`), Pound (#) , And (&) , space ,a-z,A-Z,0-9

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

RE:INPUT FIELD ACCEPT ONLY SPECIAL CHARACTERS Apostrophe (`), Pound (#) , And (&) , space ,a-z,A-Z,0-9

Reddy, Gopikrishna
Hi Thanks a lot for ur help this works fine for two special characters / and - ,a-z,A-Z,0-9
 
<xforms:bind
     nodeset="/pathtonode"
     constraint="matches( ., '^[0-9A-Za-z/\-]*$' )"/>

 
Can u plz help as how can add some more special characters like Apostrophe (`), And (&),  Pound (#) , and space
Here in this case i have an input field it should accept only Apostrophe (`), And (&),  Pound (#) , and space and a-z,A-Z,0-9
 
 
Thanks in advance,
 
 
K Gopikrishna Reddy
This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only
by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its 
contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately 
by e-mail/phone & delete it from their system without making any copies or disclosing it to a third person.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: RE:INPUT FIELD ACCEPT ONLY SPECIAL CHARACTERS Apostrophe (`), Pound (#) , And (&) , space ,a-z,A-Z,0-9

fl.schmitt(ops-users)
Hi,

> <xforms:bind
>      nodeset="/pathtonode"
>      constraint="matches( ., '^[0-9A-Za-z/\-]*$' )"/>
>
>  
> *Can u plz help as how can add some more special characters like
> Apostrophe (`), And (&),  Pound (#) , and space*
> *Here in this case i have an input field it should accept only
> Apostrophe (`), And (&),  Pound (#) , and space and a-z,A-Z,0-9*

I suppose you don't have to escape ', & or #, they are not listed as
metacharacters. For space, you could use a category escape: \p{IsZs}.
So you could try:

<xforms:bind
      nodeset="/pathtonode"
      constraint="matches( ., '^[0-9A-Za-z/-'&#\p{IsZs}]*$' )"/>

Again, not tested.

HTH
florian



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

FW: Re: RE:INPUT FIELD ACCEPT ONLY SPECIAL CHARACTERS Apostrophe (`), Pound (#) , And (&) , space ,a-z,A-Z,0-9

Reddy, Gopikrishna
[ops-users] Re: RE:INPUT FIELD ACCEPT ONLY SPECIAL CHARACTERS Apostrophe (`), Pound (#) , And (&) , space ,a-z,A-Z,0-9
 
Hi Thanks for ur help  I have tried this but it does nt works can anyone help

From: Florian Schmitt [mailto:[hidden email]]
Sent: Mon 4/14/2008 1:37 PM
To: [hidden email]
Subject: [ops-users] Re: RE:INPUT FIELD ACCEPT ONLY SPECIAL CHARACTERS Apostrophe (`), Pound (#) , And (&) , space ,a-z,A-Z,0-9

Hi,

> <xforms:bind
>      nodeset="/pathtonode"
>      constraint="matches( ., '^[0-9A-Za-z/\-]*$' )"/>
>

> *Can u plz help as how can add some more special characters like
> Apostrophe (`), And (&),  Pound (#) , and space*
> *Here in this case i have an input field it should accept only
> Apostrophe (`), And (&),  Pound (#) , and space and a-z,A-Z,0-9*

I suppose you don't have to escape ', & or #, they are not listed as
metacharacters. For space, you could use a category escape: \p{IsZs}.
So you could try:

<xforms:bind
      nodeset="/pathtonode"
      constraint="matches( ., '^[0-9A-Za-z/-'&#\p{IsZs}]*$' )"/>

Again, not tested.

HTH
florian

This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only
by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its 
contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately 
by e-mail/phone & delete it from their system without making any copies or disclosing it to a third person.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

message-footer.txt (352 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: FW: Re: RE:INPUT FIELD ACCEPT ONLY SPECIAL CHARACTERS Apostrophe (`), Pound (#) , And (&) , space ,a-z,A-Z,0-9

Hank Ratzesberger

Gopikrishna,

But I think the strategy of using matches() and regular expressions
is the best strategy, so I suggest you keep trying.  There are
books on regular expression, such as Mastering Regular Expressions and
Regular Expressions Pocket Reference from www.oreilly.com that will
give you ideas.

You have to expect these expressions take time to write and debug.

So I _think_ the issue is just the regular expression and perhaps there
are lists that focus on RE which can be more help.

Cheers,
Hank


On Apr 14, 2008, at 10:45 PM, Reddy, Gopikrishna wrote:
>
> Hi Thanks for ur help  I have tried this but it does nt works can  
> anyone help

>
> From: Florian Schmitt [mailto:[hidden email]]
> Sent: Mon 4/14/2008 1:37 PM
> To: [hidden email]
> Subject: [ops-users] Re: RE:INPUT FIELD ACCEPT ONLY SPECIAL  
> CHARACTERS Apostrophe (`), Pound (#) , And (&) , space ,a-z,A-Z,0-9
>
> Hi,
>
> > <xforms:bind
> >      nodeset="/pathtonode"
> >      constraint="matches( ., '^[0-9A-Za-z/\-]*$' )"/>
> >
>
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042







--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: FW: Re: RE:INPUT FIELD ACCEPT ONLY SPECIAL CHARACTERS Apostrophe (`), Pound (#) , And (&) , space ,a-z,A-Z,0-9

fl.schmitt(ops-users)
In reply to this post by Reddy, Gopikrishna
Hi,

 > > I suppose you don't have to escape ', & or #, they are not listed as
 > > metacharacters. For space, you could use a category escape: \p{IsZs}.
 > > So you could try:
 > >
 > > <xforms:bind
 > >       nodeset="/pathtonode"
 > >       constraint="matches( ., '^[0-9A-Za-z/-'&#\p{IsZs}]*$' )"/>
 > >

> *Hi Thanks for ur help  I have tried this but it does nt works can
> anyone help

Sorry, i made a ugly mistake - of course the apostrophe has to be escaped in any
way, because otherwise it's treated as the delimiter for the RegEx. Sadly, i'm
just now in the middle of relocating, so i can't search for a solution at the
moment. For now, you could try to remove the apostrophe from inside the RegEx to
test if that was the cause.

HTH
florian


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

FW: Re: FW: Re: RE:INPUT FIELD ACCEPT ONLY SPECIAL CHARACTERS Apostrophe (`), Pound (#) , And (&) , space ,a-z,A-Z,0-9

Reddy, Gopikrishna
[ops-users] Re: FW: Re: RE:INPUT FIELD ACCEPT ONLY SPECIAL CHARACTERS Apostrophe (`), Pound (#) , And (&) , space ,a-z,A-Z,0-9
Hi Thanks for ur help I have removed apostrophe  from RegEx as it works fine only for # how can i check for Apostrophe (`),  And (&)  space ,Plz do help me in this as it is very urgent tome

 

 

Thanks in advance,

K Gopikrishna Reddy




From: Florian Schmitt on behalf of Florian Schmitt
Sent: Wed 4/16/2008 10:19 AM
To: [hidden email]
Subject: [ops-users] Re: FW: Re: RE:INPUT FIELD ACCEPT ONLY SPECIAL CHARACTERS Apostrophe (`), Pound (#) , And (&) , space ,a-z,A-Z,0-9

Hi,

 > > I suppose you don't have to escape ', & or #, they are not listed as
 > > metacharacters. For space, you could use a category escape: \p{IsZs}.
 > > So you could try:
 > >
 > > <xforms:bind
 > >       nodeset="/pathtonode"
 > >       constraint="matches( ., '^[0-9A-Za-z/-'&#\p{IsZs}]*$' )"/>
 > >

> *Hi Thanks for ur help  I have tried this but it does nt works can
> anyone help

Sorry, i made a ugly mistake - of course the apostrophe has to be escaped in any
way, because otherwise it's treated as the delimiter for the RegEx. Sadly, i'm
just now in the middle of relocating, so i can't search for a solution at the
moment. For now, you could try to remove the apostrophe from inside the RegEx to
test if that was the cause.

HTH
florian

This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only
by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its 
contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately 
by e-mail/phone & delete it from their system without making any copies or disclosing it to a third person.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

message-footer.txt (352 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: FW: Re: FW: Re: RE:INPUT FIELD ACCEPT ONLY SPECIAL CHARACTERS Apostrophe (`), Pound (#) , And (&) , space ,a-z,A-Z,0-9

Alessandro Vernet
Administrator
On Wed, Apr 16, 2008 at 4:20 AM, Reddy, Gopikrishna
<[hidden email]> wrote:
> Hi Thanks for ur help I have removed apostrophe  from RegEx as it works fine
> only for # how can i check for Apostrophe (`),  And (&)  space ,Plz do help
> me in this as it is very urgent tome

Have a look at the applet below. I might help you debug this and find
the appropriate regular expression for your case.

http://jakarta.apache.org/regexp/applet.html

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws