Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: java.util.regex.Matcher value lengths

  1. #1
    Junior Member
    Join Date
    Aug 2011
    Location
    UK
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default java.util.regex.Matcher value lengths

    Hi.

    Please can someone advise how I may check the length of a string property using java.util.regex.Matcher.
    Many thanks,
    PDubUK


  2. #2
    Junior Member
    Join Date
    Aug 2011
    Location
    UK
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: java.util.regex.Matcher value lengths

    Found the solution,

    ^.{<EXACT LENGTH>}$
    ^.{<MIN LENGTH, MAX LENGTH>}$

    will resolve this issue.

    Many thanks.

Similar Threads

  1. Replies: 3
    Last Post: April 26th, 2011, 02:51 AM
  2. [SOLVED] Java Regex Help
    By newbie in forum Java Theory & Questions
    Replies: 7
    Last Post: January 26th, 2011, 09:01 AM
  3. java.util.ConcurrentModificationException Issue
    By joshuaa in forum Collections and Generics
    Replies: 1
    Last Post: December 2nd, 2010, 04:41 PM
  4. Urgent need a java regex pattern
    By mallikarjun_sg in forum Java Theory & Questions
    Replies: 1
    Last Post: May 6th, 2010, 05:51 AM
  5. Replies: 4
    Last Post: April 29th, 2009, 10:53 AM

Tags for this Thread