I have question how to replace whitespace with _ using notepad++ regex between [] characters
Example :
sl.[Posting date] AS TIME,
'0000-00-00' AS edate,
sl.[Document No_],
[Original Currency Factor]
Result
sl.[Posting_date] AS TIME,
'0000-00-00' AS edate,
sl.[Document_No_],
[Original_Currency_Factor]
Here a workaround that work on most of the software : Open the "Search and Replace" function (CTRL+H), in the "Search" field type two space " " and in the "Replace" field type one space " " then click on "Replace All" button as many time as you need to replace all the useless space (0 occurrences found).
To add a space in a text editor, move the cursor to the place where you want to add the space, using either the arrow keys on your keyboard or by clicking there with your mouse, then press the space bar in your keyboard.
In Notepad++ press Ctr+H to open the “Find and Replace” window. Under Search Mode: choose “Regular expression” and then check the “matches newline” checkbox. You should see closing </p> tags at the end of each line.
Find what: [.+(\s)+.+]
Replace with: _
Also don't forget to select Regular expression
radio button in Search mode
section.
Update:
Ok, I have one solution but it's dirty:
You need to perform several replacements to do that.
Find what: (\[.*)\s(.*\])
Replace with: \1_\2
Repeat using Replace all
until there will be no occurrences.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With