I need to match an expression in Python with regular expressions that only matches even number of letter occurrences. For example:
AAA # no match AA # match fsfaAAasdf # match sAfA # match sdAAewAsA # match AeAiA # no match
An even number of As SHOULD match.
Try this regular expression:
And if the
As don’t need to be consecutive: