Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Java Regular Expression for double spaces

807605Jul 11 2007 — edited Jul 11 2007
I am using ([\\s\\s]+) this regex for finding double spaces but if in single segment (Text Line) there exists two or more double spaces then it is finding only one from it .

Matcher m = Pattern.compile( regexp ).matcher(Segment );

while(m.find)
{
p.println(" ERROR :: Punctuation (Double Dot ) Error");
}

Suggets solution
Thanks
amit
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 8 2007
Added on Jul 11 2007
12 comments
1,677 views