
I newline is also a non”.”-character, so it will match a newline followed by a newline, no matter if there is a. METHODS check_for_delivery_referenc RAISINGĢ. *not that (the last 'e' was also replaced) METHODS check_for_delivery_reference RAISING


It will match what it says “a non-“.” character, followed by a line break” – and AdT-search (or Notepad++) will highlight that, and make it available for replace / replace all.īut actually, that’s not what I want: I only want to replace the line break, NOT also the character preceding it. I try to keep it short, only mentioning 2 of them I do understand:ġ.

So in theory, this should work, but actually, it does not really – there are some problems! ^ -> negation the character list means any one charter that is neither a nor b nor c.Ī character, that is anything but a. > a character list means any one charter that is a b or c. (note: “remove” can be also be spelled “replace with nothing (or with space)”. The logic is: if there is a line break, that is not preceded by a “.”, remove that line break. Please note, this time, it’s only about the line breaks: I want to remove some of them. So let’s start with a example un-clean code: METHODS check_for_delivery_reference

I’ll show you how far I got, and am happy if together we can go even further. So I have a problem or lets call it a wish: I want nice-looking method definitions, without unneeded line-breaks and without braking my fingers from manual editing.įortunately, I can look forward to SAP providing something to achieve that in the future, but I want it now.Īlready when writing my questions, I though “well regular expressions should be able to do that, right?”. And I think you have to start RegEx blogs with such a quote! (I didn’t make the rules! 😉 ) I can’t remember exactly (do help me out in the comments!), but someone said something along the lines of: “If you have a problem, go use regular expressions. My half-solution: search for \R and either click “find next” or “replace (with space)”.
