I have the following text :
This is paragraph #1
[comment]: # (London, Paris)
This is paragraph #2
[comment]: # (Paris, Berlin)
This is paragraph #3
[comment]: # (London, Berlin)
This is paragraph #4
[comment]: # (Paris)
This is paragraph #5
[comment]: # (Berlin)
I want to match all the lines containing Berlin AND for each match, the line before, in order to fold all the lines NOT containing this pattern :
.....(folded).....
This is paragraph #2
[comment]: # (Paris, Berlin)
This is paragraph #3
[comment]: # (London, Berlin)
.....(folded).....
This is paragraph #5
[comment]: # (Berlin)
I came up with this solution
```
((.\n){1}).Berlin.*
which works under Python in Regex101 and which you can find at
https://regex101.com/r/jXD7gw/3
But when I try it in Editorial, it fails (simple workflow with FOLD LINES CONTAINING… with that regex and, of course the INVERT button on.
Where did I go wrong ?
Thanks in advance