^[^ ](.*[^ ])?$
On Aug 27, 6:12 pm, doodler <achick... gmail.com> wrote:
> Hi
>
> I need help trying to use regular expression to
validate that there is
> no white space at the start and end of a string. Also
the string can
> contain spaces, just not at the start and end. Also the
string can be
> a single character. Any help will be much appreciated.
>
> I got this far but it does not cater for a single
character
>
> namePattern = "((^[A-Z0-9]([A-Z_0-9
]+)?[A-Z0-9]$){1,12})";
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regex googlegroups.com
To unsubscribe from this group, send email to
regex-unsubscribe googlegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---
|