03-21-2014, 05:55 PM
Sorry for this very simple question.
But I have a lot of trouble tackling this seemingly very simple request:
A string
The line(s) between between abc and def must be removed IF it contains:
- one or more spaces / one or more ALT+255 chars (nbsp)
- one or more tabs
- one or more ENTERS / SHIFT+ENTERS
It can be a combination of the above
I have tried many regexes containing:
But it constantly creates 1 line (see below) OR it does nothing and thus keeping the original result
in stead of the desired result:
How I build the regex:
- I always start the regex by placing the cursor at the beginning by using: ^
Then I follow with
- zero or more spaces: \s*
- zero or more tabs: \t*
- followed at the end by a carriage return and newline: \r\n
I combined that with the previous mentioned: $ ,\w , [] but I end up with all on one line OR no changes at all.
This is really weird for me, because I have solved complexer regexes much easier in QM.
But this simple thing I cannot solve.
(also tried regexes from stackoverflow.com, but also constantly no result or everything on one line)
But I have a lot of trouble tackling this seemingly very simple request:
A string
The line(s) between between abc and def must be removed IF it contains:
- one or more spaces / one or more ALT+255 chars (nbsp)
- one or more tabs
- one or more ENTERS / SHIFT+ENTERS
It can be a combination of the above
I have tried many regexes containing:
- /s
- /t
- /W
- [] (topic: Problem Stripping line returns)
- beginning expression: ^ and end expression: $
- /r/n
- /b
But it constantly creates 1 line (see below) OR it does nothing and thus keeping the original result
in stead of the desired result:
How I build the regex:
- I always start the regex by placing the cursor at the beginning by using: ^
Then I follow with
- zero or more spaces: \s*
- zero or more tabs: \t*
- followed at the end by a carriage return and newline: \r\n
I combined that with the previous mentioned: $ ,\w , [] but I end up with all on one line OR no changes at all.
This is really weird for me, because I have solved complexer regexes much easier in QM.
But this simple thing I cannot solve.
(also tried regexes from stackoverflow.com, but also constantly no result or everything on one line)