horsechoker has asked for the wisdom of the Perl Monks concerning the following question:
Hello Friends,
I'm trying to do the following:
1. Open CSV File.
2. Parse text and search for any Base64 encoded text.
3. Take that text and decode it using the MIME::Base64 package.
4. Replace encoded text with decoded text.
I'm running into some issues here. I first tried using the Text::CSV package but found it a bit difficult to use (I'm a bit new to perl, and had issues accessing data directly in the array that text::csv created when reading the csv file).
The main issue I'm having is finding a legit way to just search the document for Base64 encoded text. I've exhausted my googling skills and have come to you gents for advice.
Anyone know of a way in which I can search a document for Base64 encoded text? I've been trying to use the following regex which I found on this forum. I have no idea how to implement it into my code....
If needed, I can post my code thus far. Thanks!m{ ^ (?: [A-Za-z0-9+/]{4} )* (?: [A-Za-z0-9+/]{2} [AEIMQUYcgkosw048] = | [A-Za-z0-9+/] [AQgw] == )? \z }x
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Searching for Base64
by zwon (Abbot) on May 12, 2010 at 21:27 UTC | |
by horsechoker (Initiate) on May 12, 2010 at 21:50 UTC | |
by zwon (Abbot) on May 12, 2010 at 22:00 UTC | |
by Anonymous Monk on May 25, 2010 at 11:35 UTC | |
|
Re: Searching for Base64
by ChiefAl (Initiate) on May 12, 2010 at 21:02 UTC |