On 23 Jun 2006, at 17:48 , Scott Haneda wrote:
So, in a multi hundred meg file, anyone know how I can find the base64
lines, and carriage return, and delete them, leaving the rest in tact.
Ideally, it would look for the base64 start as a trigger, and maybe a
boundary. I am not sure base64 will be identifiable amongst all
the other
stuff in the file though.
I think, from dealing with base64 encoding several years back, that
the lines are a preset length and contain no spaces.
That should be enough for you to find the base64 blocks in the text
using a grep pattern
something like
Find: ^[A-z,1-9/]{76}$
Repl: <nill>
would find all the lines containing only alphanumerics and the / that
are exactly 76 characters long.
Test, obviously, for any false positives. I ran it over a 276 MB
file and did not notice any flase positives, YMMV.
(BTW< A-z works in egrep from the command line to find A-Z and a-z,
not sure if it works in BBEdit).
--
Why live in the world when you can live in your head?
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>