Hi Rainer, To remove all line breaks (`\n`) except for the ones where the lines starts with a number followed by `.` :
Search Pattern : `\n(?!\d+\.)` Replace Pattern: ` ` Note that the Replace pattern is a space to avoid concatenating together the lines. Best regards, Jean On Friday, July 7, 2023 at 6:24:09 PM UTC+2 Rainer Krug wrote: > OK - found it. > Search Pattern: `^[0-9]\. ` > Replace Pattern: `###\0` > > Same for two digits. > > I was always trying `\1'... > > Thanks Pattern Playground!!! > > On Friday, July 7, 2023 at 6:10:51 PM UTC+2 Rainer Krug wrote: > >> I have a file as followed: >> >> 4. Leach M et al.: Equity and sustainability in the anthropocene: a >> social–ecological systems perspective on their intertwined >> futures. Glob Sustain 2018, 1 >> This important review by some of the leading authorities in the field, >> summarizes the state of knowledge concerning the interlinked challenges >> of equity and sustainability. Emphasizing that they cannot be addressed >> separately, it outlines emerging new thinking which recognizes the >> multiple perspectives and dimensions involved. >> 24. Scoones I: The politics of sustainability and development. Annu >> Rev Environ Resour 2016:1-27 >> 5.Feola G: Societal transformation in response to global >> environmental change: a review of emerging concepts. Ambio >> 2014, 44:376-390. >> >> Now I want to remove all line breaks (`\n`) except for the ones where the >> lines starts with a number followed by `.`. >> >> I was thinking: Replace all `xx. ` with `####xx. ` - but how can I do >> this? >> >> After that, I could remove all `\n` and replace `####` with `\n` and >> I have it. >> >> Any suggestions? >> >> Thanks, >> >> Rainer >> >> -- This is the BBEdit Talk public discussion group. If you have a feature request or need technical support, please email "[email protected]" rather than posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/bbedit/7b05bcf9-2a34-4f03-b62c-73a9d42972ban%40googlegroups.com.
