RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Java class name (global)
Expression
^([a-z]{2,3}(\.[a-zA-Z][a-zA-Z_$0-9]*)*)\.([A-Z][a-zA-Z_$0-9]*)$
Description
Regular Expression for validating fully qualified Java Class Names that follows the Java Naming Conventions for widely available classes (see: http://java.sun.com/docs/books/jls/third_edition/html/names.html#6.8). Group 1 gives the package name, group 3 gives the class name.
Matches
foo.Bar | foo.bar.IFBar1 | wo.w_1.Ffo$o.Bar
Non-Matches
Bar | Foo.Bar | foo.bar | foo/Bar | fooo.Bar
Author Rating: Not yet rated. Attila Varga
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Copyright © 2001-2024, RegexAdvice.com | ASP.NET Tutorials