> On Sep 15, 2021, at 00:51, ctfishman <[email protected]> wrote:
> 
> I tried doing this with just a regular expression but couldn't figure out how.

Hey There,

Yeah, you couldn't automate the whole process with regex alone.

> I was however able to do it quite easily with a text filter...
> 
> --------------------------
> 
> #!/usr/bin/perl
> 
> # Read each line into a scaler, then print it back
> 
> my $fullstring;
> 
> while (<>) {
>     $fullstring .= $_;
>     print;
> }

Looks good, although I'd shortcut the above with:


#!/usr/bin/env perl -0777 -nsw

print;


Now the entire string is in $_ and ready to process.


--
Best Regards,
Chris

-- 
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/D625E3D2-F473-4FA1-8A2B-F404DC2FA76F%40gmail.com.

Reply via email to