[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

anon.penet.fi hacking




Julf challenged:
>Ok... Now.. Show me the regex that strips anything starting with '--',
>such as '-----------------------------', except a PGP boundary line...

I posted something which didn't quite work, as Julf says:

>But... It still
>doesn't strip off something starting with only "--" on a line by itself...

^--(|.|..|...(|[^B]|B[^E]|BE[^G]|BEG[^I]|BEGI[^N]|BEGIN[^ ]|BEGIN [^P]\
|BEGIN P[^G]|BEGIN PG[^P]))

Some implementations don't support empty alternation, so that could be
changed with the ? syntax, since (|a) and (a?) are the same.

That should do it.

Eric