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 5 of 5

Thread: regex new lines and the . character

  1. #1
    Member
    Join Date
    May 2010
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default regex new lines and the . character

    the . character in a regular expression does not match new lines
    how do i match any character, including an unknown number of new lines?


  2. #2
    Member
    Join Date
    May 2010
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: regex new lines and the . character

    ive tried these:
    [.|\\s]*?
    (.|\\s)*?
    .|\\s*?
    none seem to work

  3. #3
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,437
    Thanks
    49
    Thanked 2,217 Times in 2,190 Posts

    Default Re: regex new lines and the . character

    If you don't understand my answer, don't ignore it, ask a question.

  4. #4
    Member
    Join Date
    May 2010
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: regex new lines and the . character

    yes they found the answer
    sorry about cross posting but i didnt get an answer
    whenever i cross post, i always update all the threads so no one wastes time fixing a problem that has already been solved

  5. #5
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,437
    Thanks
    49
    Thanked 2,217 Times in 2,190 Posts

    Default Re: regex new lines and the . character

    You should add the link to the other site in the beginning and not wait until afterwards.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Regex code to match character * in IpAddress
    By jeevana in forum What's Wrong With My Code?
    Replies: 0
    Last Post: December 30th, 2011, 04:46 AM
  2. Need some Regex help, please.
    By Josheh in forum Java SE APIs
    Replies: 1
    Last Post: December 15th, 2011, 08:43 PM
  3. help with regex
    By fate0x1 in forum Java SE APIs
    Replies: 1
    Last Post: November 18th, 2011, 03:44 PM
  4. need help with regex
    By o2a1 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: February 13th, 2011, 07:50 AM
  5. The character '' is an invalid XML character exception getting
    By sumanta in forum What's Wrong With My Code?
    Replies: 5
    Last Post: January 9th, 2010, 11:13 AM