python - String Matching with regular expressions -


i trying write regular expression in python takes string , checks if:

  1. the last character vowel.
  2. the last 2 characters not same.

this came with:

[aeiou]$ 

can me point number 2: last 2 characters not same. example, expresso valid , expressoo not valid.

it might easier without regular expression.

e.g if s[-2]!=s[-1] , s[-1] in 'aeiou'


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -