[Geany-Users] Regular expression, for Unicode characters

Vesta laguna-mc at xxxxx
Tue Aug 2 22:49:05 UTC 2016


One note: how to replace <p> with <p class="bold"> in all matched lines?



> Sent: Tuesday, August 02, 2016 at 3:17 PM
> From: "Colomban Wendling" <lists.ban at herbesfolles.org>
> To: "Geany general discussion list" <users at lists.geany.org>
> Subject: Re: [Geany-Users] Regular expression, for Unicode characters
>
> Le 31/07/2016 à 15:19, Vesta a écrit :
> > Can anyone show how should look regular expression for this particular case?
> 
> This will work:
> 
> (<p)(>[^[:lower:]]*[[:upper:]][^[:lower:]]*</p>)
> 
> It matches any *but* lowercase, then one upper character, then anything
> *but* lower characters.  Using "not lowercase" is useful to allow
> punctuation and digits.
> 
> if you're interested in supporting uppercase <p> tags, you'll need to
> make quantifiers ungreedy too:
> 
> (<[pP])(>[^[:lower:]]*?[[:upper:]][^[:lower:]]*?</[pP]>)
> 
> Cheers,
> Colomban
> _______________________________________________
> Users mailing list
> Users at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/users
>


More information about the Users mailing list