Remove Empty Lines using Regex

Greetings, i have tried to remove certain empty lines from a list i have parsed but everything i tried using Regex didn’t work. I used the Regex Replace block and i tried these:

^\s*$
^[\s]$\n
(^(\r\n|\n|\r)$)|(^(\r\n|\n|\r))|^\s
$

None of them were able to replace the empty lines. Is there another way to remove empty lines? i added an example on how it looks and how i receive it.

NEEDED STRING



NEEDED STRING



NEEDED STRING












NEEDED STRING



NEEDED STRING



NEEDED STRING












NEEDED STRING



NEEDED STRING



NEEDED STRING

Send the complete LoliCode of the replace please.
Also which type is your variable? String or List of Strings?

I can’t copy the entire list of lolicode because OB2 breaks the copy paste in the process for some reason but what im doing is that i take a part of the website i need and then i clean out all the unused stuff and afterwards im left with a result seen above. The final step is to remove the empty lines between the “Needed Strings”.

From what i can see as soon as i add a ^ at the start and a $ at the end the regex system in OB2 doesn’t do its job anymore.

I tested the regex strings above in regexr.com and there they showed me the correct result.

I need to know if you have a string variable or a list of strings variable. You can see it in the variables tab of the debugger.