I found the right Grep to remove a space before a line of words: " *(^)([ ])* " " [ ] " means a space. The square bracket defines a character class, which means it matches any character inside the brackets. In this case, there is only one character, a space, so it matches a space. Other solutions also removed blank lines, which was not the intention. Thank you all for your kind help!
Best regards from Otto Op maandag 29 juli 2024 om 15:00:02 UTC+2 schreef Otto Munters: > Hi Ulrich > Thank you for your reply. This Grep also removes the empty lines. How can > I avoid that? > Here is an example: > > 166 > 00:09:51,690 --> 00:09:55,510 > And then this entire thing is > nothing but wood, right? > > 167 > 00:09:55,530 --> 00:09:58,150 > It's just like, but then I look > over there and I salute Otto, > > So I only want to remove the whitespace in the beginning of the last line > of the example. And not the blank line between the two text blocks. > Thank you for your attention. > > Regards from Otto > Op vrijdag 26 juli 2024 om 16:17:13 UTC+2 schreef Ulrich Kapp: > >> Hi Otto, >> >> use Grep option in search and >> >> (^)(\W)(.*$) >> >> >> as search pattern and >> >> \1\3 >> >> as replacement pattern >> >> That will help. >> >> Otherwise it will help to play around with the *Pattern Playground* in >> BBEdit to find a solution. >> >> Best wishes, Ulrich >> Otto Munters schrieb am Freitag, 26. Juli 2024 um 13:39:05 UTC+2: >> >>> Hi BB friends >>> How do I remove a empty space before a sentence with words? >>> Thanks for your help! >>> >>> >>> -- This is the BBEdit Talk public discussion group. If you have a feature request or believe that the application isn't working correctly, please email "[email protected]" rather than posting here. Follow @bbedit on Mastodon: <https://mastodon.social/@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/f81768a3-d481-4921-b4e6-c7d6cbffaf02n%40googlegroups.com.
