Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2007

Tip: Looking for answers? Try searching our database.

really dumb question

Thread view: 
Aryeh M. Friedman - 29 Oct 2007 08:58 GMT
I know if I just looked a little harder (been at it for an hour) I am
sure to find this:

How do I match (using regex's) contains nothing but uppercase
characters (no non -alpha, numbers, whitespace, etc.)
Haran Pilpel - 29 Oct 2007 09:03 GMT
> How do I match (using regex's) contains nothing but uppercase
> characters (no non -alpha, numbers, whitespace, etc.)

[A-Z]* should work.
Lew - 29 Oct 2007 14:12 GMT
>> How do I match (using regex's) contains nothing but uppercase
>> characters (no non -alpha, numbers, whitespace, etc.)
>
> [A-Z]* should work.

But only for certain locales.

Signature

Lew

Christopher Benson-Manica - 29 Oct 2007 20:57 GMT
>> How do I match (using regex's) contains nothing but uppercase
>> characters (no non -alpha, numbers, whitespace, etc.)

> [A-Z]* should work.

Depends on whether the empty string is desired to be part of the
result set.

Signature

 C. Benson Manica    | I appreciate all corrections, polite or otherwise.
cbmanica(at)gmail.com |
----------------------| I do not currently read any posts posted through
  sdf.lonestar.org   | Google groups, due to rampant unchecked spam.

Sherman Pendley - 30 Oct 2007 01:57 GMT
>> How do I match (using regex's) contains nothing but uppercase
>> characters (no non -alpha, numbers, whitespace, etc.)
>
> [A-Z]* should work.

This should work better, and match non-ASCII letters:

   \p{Lu}+

sherm--

Signature

Web Hosting by West Virginians, for West Virginians: http://wv-www.net
Cocoa programming in Perl: http://camelbones.sourceforge.net

Lew - 29 Oct 2007 14:18 GMT
> I know if I just looked a little harder (been at it for an hour) I am
> sure to find this:
>
> How do I match (using regex's) contains nothing but uppercase
> characters (no non -alpha, numbers, whitespace, etc.)

I'm surprised that
<http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html>
didn't show up very early in your hour.

\p{Lu}

Signature

Lew

Roedy Green - 29 Oct 2007 15:12 GMT
On Mon, 29 Oct 2007 07:58:57 -0000, "Aryeh M. Friedman"
<Aryeh.Friedman@gmail.com> wrote, quoted or indirectly quoted someone
who said :

>How do I match (using regex's) contains nothing but uppercase
>characters (no non -alpha, numbers, whitespace, etc.)

see http://mindprod.com/jgloss/regex.html
A-Z
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.