Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String s = "O Jesus - Jesus Jesus-O - Jesus - O -O";
- s.replaceAll(" - ", "-"); <- This only replaces first spacy-hyphen with hyphen
- "O Jesus-Jesus Jesus-O-Jesus-O-O";
- s = s.replaceAll("\s*-\s*", "-");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement