This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Struts and the fly likes Regular expression issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Regular expression issue" Watch "Regular expression issue" New topic

Regular expression issue

Rajive Jha

Joined: Apr 30, 2011
Posts: 2
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.

I agree. Here's the link:
subject: Regular expression issue
It's not a secret anymore!