[Geany-Users] Regular expression, for Unicode characters

Colomban Wendling lists.ban at xxxxx
Tue Aug 2 12:17:02 UTC 2016


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


More information about the Users mailing list