Answers for "java replace many spaces with one space"

4

replace multi spaces with single space

import re
re.sub(' +', ' ', 'The     quick brown    fox')
'The quick brown fox'
Posted by: Guest on August-05-2020
0

java replace whitespace

st = st.replaceAll("\s+","")
Posted by: Guest on June-25-2021

Code answers related to "java replace many spaces with one space"

Python Answers by Framework

Browse Popular Code Answers by Language