On Fri, 6 Feb 2026 15:17:10 -0800 (PST), D O wrote:
> 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!
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
<[email protected]>
--
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/20260207123116624104.0979fd6a%40adelaide.on.net.