0

I need to reduce number of white spaces in large number of files. For example:

tree house big small like go down up nice good 2323'0'-., 123 1234lk 

I want it to be like this:

 tree house big small like go down up nice good 2323'0'-., 123 1234lk 

It should go by logic somthing like this but I don't know how to do it: one white space | one or more white spaces | any sign character not whitespace | one whitespace

in Replace section it should be somthing like: one whitespace | &1 | one whitespace

This is some logic but if I knew how to do it I would not ask questions.

Regards, Nebojsa

1
  • 1
    Something like \s+(\S+)\s+ -> " \1 "? Or \s{2,} -> " ". Commented Oct 21, 2016 at 8:41

2 Answers 2

0

in notepad++

\s{2,} 

change to simple space

Sign up to request clarification or add additional context in comments.

1 Comment

This is solution. Simple and perfect.
0

You need simple regex.

 regexp_replace(str,'\s+',' ','m'); 

'm' - modification for multiline

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.