@Chris-Tanguay-0 said in is there a REMOVE UNNECESSARY BLANK only (not EOL also)?:
I just need to convert any 2 or more consecutive spaces found
FIND = \x20+ (this could be space-plus, +)
REPLACE = \x20 (this could be a single space)
SEARCH MODE = regular expression
\x20 is a way of representing the space character that is easy to read/copy/paste from the forum; I mention both for ease of use. So if you’re typing, just type the characters for space and plus in the SEARCH dialog; if you’d rather copy/paste, it’s probably better for the \x20 version.
BTW: this is what @Terry-R was hinting at, suggesting that you could easily figure out how to use regular expressions to search for more than one space and convert it to a single space… because that’s about the simplest modifier (+) in regular expressions.
It will behoove you to start learning this on your own.
----
Please note: This Community Forum is not a data transformation service; you should not expect to be able to always say “I have data like X and want it to look like Y” and have us do all the work for you. If you are new to the Forum, and new to regular expressions, we will often give help on the first one or two data-transformation questions, especially if they are well-asked and you show a willingness to learn; and we will point you to the documentation where you can learn how to do the data transformations for yourself in the future. But if you repeatedly ask us to do your work for you, you will find that the patience of usually-helpful Community members wears thin. The best way to learn regular expressions is by experimenting with them yourself, and getting a feel for how they work; having us spoon-feed you the answers without you putting in the effort doesn’t help you in the long term and is uninteresting and annoying for us.
----
Do you want regex search/replace help? Then please be patient and polite, show some effort, and be willing to learn; answer questions and requests for clarification that are made of you. All example text should be marked as literal text using the </> toolbar button or manual Markdown syntax. To make regex in red (and so they keep their special characters like *), use backticks, like `^.*?blah.*?\z`. Screenshots can be pasted from the clipboard to your post using Ctrl+V to show graphical items, but any text should be included as literal text in your post so we can easily copy/paste your data. Show the data you have and the text you want to get from that data; include examples of things that should match and be transformed, and things that don’t match and should be left alone; show edge cases and make sure you examples are as varied as your real data. Show the regex you already tried, and why you thought it should work; tell us what’s wrong with what you do get. Read the official NPP Searching / Regex docs and the forum’s Regular Expression FAQ. If you follow these guidelines, you’re much more likely to get helpful replies that solve your problem in the shortest number of tries.