Simple question

6 views
Skip to first unread message

D O

unread,
Feb 6, 2026, 8:32:58 PM (17 hours ago) Feb 6
to BBEdit Talk
I have a bunch off files  the format below 

*D:23.92#1:77.09702#2:0.6500294#4:179.0083#6:4.753435#9:0.85#30:-0.5238096#31:-4.724749#72:531985#0:1606!

I want to get rid of the string attached to #72 which is sometime four digits, sometimes 5
The #0 is alway there 

So I would have this 
*D:23.92#1:77.09702#2:0.6500294#4:179.0083#6:4.753435#9:0.85#30:-0.5238096#31:-4.724749#0:1606!

Brian Forte

unread,
Feb 6, 2026, 9:45:49 PM (16 hours ago) Feb 6
to bbe...@googlegroups.com
Assuming

1. ‘#72:’ uniquely identifies the beginning of the string to be
removed; and

2. ‘#0’ are always the first characters to appear after the last
character of the string to be removed;

a fairly simple regex should do.

Search for: #72:[0-9]{4,}#0

Replace with: #0

The regex looks for ‘#72:’, followed by a string of at least four
numbers, followed by ‘#0’.

It replaces the found string with ‘#0’.

Hope this helps,

Regards,

Brian Forte.
--
Brian Forte
<bfo...@adelaide.on.net>
Reply all
Reply to author
Forward
0 new messages