Hi Otto,

Here is a commented regular expression that should match what you want to 
remove.
Copy and paste it as is in the Find window using the menu 'Edit > Paste > 
and Select', otherwise it will be escaped.


















*(?xx)                                               # Allow comments and 
ignore whitespace.(?(DEFINE)                                          # 
Define reusable patterns.    (?<TIMESTAMP>                                 
  # TIMESTAMP named pattern.        \d{2,}:[0-5][0-9]:[0-5][0-9],\d{3}    
))^                                                   # Start of line.\d+   
                                              # One or more digits.\h*     
                                            # Zero or more horizontal 
whitespace.\v                                                  # A vertical 
whitespace.(?&TIMESTAMP)\h*-->\h*(?&TIMESTAMP)                 # Two 
TIMESTAMP patterns separated by an arrow.(    \v\h*\v                       
                  # Followed by a blank line|                               
                    # or    \Z                                             
 # the End Of File.)*Leave the Replace field empty.

For definitive PCRE2 pattern documentation, see 
https://www.pcre.org/current/doc/html/pcre2pattern.html.

HTH

Jean Jourdain

On Friday, December 27, 2024 at 11:16:02 AM UTC+1 Alberto Gutiérrez wrote:

> Hi, Otto. I think this would work:
>
> (?<=\r)\d+\r\d(.+?)(?=\r\r)
>
> Looks for a return, then a digit one or more times, a return,  a digit 
> (the first of the line with the time stamp), and anything up to two returns.
>
>

-- 
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 visit 
https://groups.google.com/d/msgid/bbedit/90754913-c732-4a7f-a312-b48e01edeea6n%40googlegroups.com.

Reply via email to