here's what I use: inline pgp:
https://github.com/whiteout-io/mail-html5/blob/master/src/js/dao/email-dao.js#L726 clear signed: https://github.com/whiteout-io/mail-html5/blob/master/src/js/dao/email-dao.js#L747 should you not have normalized line endings, this is slightly more code, see Google's E2E. It's pretty important to make sure you start at the line beginning (and end at the line ending), otherwise a plaintext response to a pgp message will screw your regex up... cheers Felix On Jul 31, 2014 12:35 AM, "Tio Oscar" <[email protected]> wrote: > 2014-07-30 19:09 GMT-03:00 Tim Prepscius <[email protected]>: > >> you might try checking out: >> >> >> https://github.com/timprepscius/mv/blob/master/client/web/WebContent/js/model/DecryptedOriginal.js >> >> works with all pgp blocks encountered on the gpg mailing list and as >> well a few others. >> >> I think there is some other relevant code you can search around for. >> >> -tim >> >> On 7/30/14, Tio Oscar <[email protected]> wrote: >> > Hi. >> > >> > I need to find in-line messages (Signed and Encrypted blocks) from a >> > string. >> > >> > I'm ussing regular expresions: >> > >> > var PGPBlockExp = /(-+BEGIN PGP MESSAGE-+[^-]+-+END PGP MESSAGE-+)/mig >> > var PGPSignExp = /(-+BEGIN PGP SIGNED MESSAGE-+[^-]+-+BEGIN PGP >> > SIGNATURE-+[^-]+-+END PGP SIGNATURE-+)/mig; >> > >> > The PGP blocks works well, but in the PGP Signed messages, this fails >> when >> > the string have dash characters (-). >> > >> > ¿Do you know some method (or expresion) to do it? >> > >> > Thanks, sorry my poor english :). >> > >> > -- >> > Exos ~ (>‿◠)✌ >> > Linked'in: http://www.linkedin.com/in/ogexos >> > Twitter: @exos, Indeti.ca: @exos >> > Cel: [+54 9 11] 6133-2442 >> > >> > -----BEGIN GEEK CODE BLOCK----- >> > Version: 3.1 >> > GCS/IT d-- s++:* a- C+++$ UBL+++$ P(-) L+++$ !E--- W+++$ !N !o K-? >> !w--- !O >> > !M-- V? PS+++@ !PE Y+(++) PGP++ !t--- !5 X++ R(+) tv--(!) b- DI D-- G >> e@ >> > h>++ r--- y*>+++++ >> > ------END GEEK CODE BLOCK------ >> > >> _______________________________________________ >> >> http://openpgpjs.org >> Subscribe/unsubscribe: http://list.openpgpjs.org > > > Thanks, I'm doing this very similar: > > http://paste.kde.org/pgeogqigs > > -- > Exos ~ (>‿◠)✌ > Linked'in: http://www.linkedin.com/in/ogexos > Twitter: @exos, Indeti.ca: @exos > Cel: [+54 9 11] 6133-2442 > > -----BEGIN GEEK CODE BLOCK----- > Version: 3.1 > GCS/IT d-- s++:* a- C+++$ UBL+++$ P(-) L+++$ !E--- W+++$ !N !o K-? !w--- > !O !M-- V? PS+++@ !PE Y+(++) PGP++ !t--- !5 X++ R(+) tv--(!) b- DI D-- G > e@ h>++ r--- y*>+++++ > ------END GEEK CODE BLOCK------ > > _______________________________________________ > > http://openpgpjs.org > Subscribe/unsubscribe: http://list.openpgpjs.org >
_______________________________________________ http://openpgpjs.org Subscribe/unsubscribe: http://list.openpgpjs.org

