• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

java.util.regex.Pattern

 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I want to check my input string that it contains only the characters:
a-z, A-Z , 0-9, [,],{,},/,,, ,_,

I was told I can use a Pattern , but when looking it up, I didn't find what I need, can anyone shed some light here ?
Thanks
p.s - I know I could do it the hard way by running a char char check, but I want to avoid that way
 
Ranch Hand
Posts: 657
Spring VI Editor Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


/* Edit */
I really need another cup of coffee...
[ April 07, 2005: Message edited by: Steve Morrow ]
 
Bartender
Posts: 1205
22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Dave Jones:

I was told I can use a Pattern , but when looking it up, I didn't find what I need, can anyone shed some light here ?
Thanks



Are you saying you didn't find the Pattern javadoc? Try here.

For a little sample code that uses Pattern, look this discussion.

Does that clear it up?

Ryan
[ April 07, 2005: Message edited by: Ryan McGuire ]
reply
    Bookmark Topic Watch Topic
  • New Topic