Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to include /(Forward slash) in my regular expression

807588Jun 16 2009 — edited Jun 17 2009
Hai All,

I am having a regular expression which should accept only A-Z,0-9, _(underscore) and .(period) .

<property name="patterns" value="[A-Z0-9\\._]*" />
Now i need to add /(Forward slash) to this expression.
<property name="patterns" value="[A-Z0-9\\._/]*" />

But when i add it it is accepting both Foward slash and Backward slash.

Can someone guide me such that it accepts only A-Z, 0-9, Underscore, period and a Forward slash(/).

Thx in advance..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 15 2009
Added on Jun 16 2009
3 comments
5,577 views