On 10/11/15 10:02, Mattia Rizzolo wrote:
> [...]
> I'm not that good at writing regex, but I tried to cook something that
> works either with the quotes or without, but I failed.
>     perl -pe 's/(^|\s)(?:'\'')-[AbBFgG](?:'\'')(\s|$)/$1$2/g'
> do you have a clue about what's wrong here?
> 
> worst case I can always pipe the two perl calls, one considering the
> quotes and the other no.

What about this?

     perl -pe 's/(^|\s)['\'']?-[AbBFgG]['\'']?(\s|$)/$1$2/g'

Tomasz

Attachment: signature.asc
Description: PGP signature

Reply via email to