I want to use regex to match against patterns I set in an XML schema. The problem is that Matcher.find() returns a match even if it's only a partial match. For example, here is a pattern for zip code:
I only want it to return true if the ENTIRE input string matches the pattern.
So, "55555" or "55555-2222" should return true, but "55555-23" or "523121" returns false. Matcher.find() will always find a match for any of these values. What is the best way to make it return true only in the case that the entire input string matches? [ October 14, 2004: Message edited by: Paro Karisian ]
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus