Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Regular expression issue

Rajive Jha
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a requirement where in i have validate a company name which accepts only:
a space between each word

The name shall always start with a alphabet and if there are multiple words only 1 space shall be allowed.
last letter of the name can also be apostrophe.

Can someone guide me how to write such regex.

Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!