• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Regular Expression Format Help

 
Ranch Hand
Posts: 485
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have the below requirement.
Do not allow I or O in a particular text box.

I thought of having the client side validation with the regular expression pattern.
But i am not able to figure out an expression for this.

Any help would be appreciated.

Thanks
 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm no expert, but I would probably use something like:

[A-HJ-Z] <-- EDIT: ignore this, it's stupid, sorry. See my next post...

Or is that overly simple?

Two resources that I always find very useful:
Regular Expressions Cheat Sheet
Just has some handy reminders about syntax for regular expressions.

Online RegEx Tester
Tests your regular expressions, to allow you to iteratively improve them.

Dave.
[ January 08, 2008: Message edited by: David Payne ]
 
Mark Newton
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry - that was a stupid answer, and I regret it...

What about just:

[IO]

This will tell you whether either I or O appears in the text box.
 
reply
    Bookmark Topic Watch Topic
  • New Topic