Android Question Regex.Matcher - Single Occurance of a Char?

JohnD

Active Member
Licensed User
Longtime User
Actually, I gave you the wrong specification for what I needed. You answered my question perfectly. However, what I should have said is "I need the user to be able to enter 1 and only 1 embedded space...and the embedded space is optional, not required." Is there a way to make that embedded space optional? Thanks again Manfred. JD.
 
Upvote 0

bparent

Member
Licensed User
Longtime User


Try ^(\w*)(\s?)(\w*)$
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…