Hi all,
I'm trying to break a string at every , and .
So I have something like Pattern.compile ("(\\. )|(, )");
but this is not working well for me, I wanted to change it so it will match the "." only if it found only one in a given word
Example:
"Break here. But don't break he.re."
So basically I want to know how to define a pattern that requires no more than 1 "." in a word.
Thanks alot.
I'm trying to break a string at every , and .
So I have something like Pattern.compile ("(\\. )|(, )");
but this is not working well for me, I wanted to change it so it will match the "." only if it found only one in a given word
Example:
"Break here. But don't break he.re."
So basically I want to know how to define a pattern that requires no more than 1 "." in a word.
Thanks alot.
Comment