I’d like to perform a regexp search operation in python to match everything, but one character (which in this example is at the end):
expression = re.compile(r'http:\/\/.*')
The above regular expression would match whole url: http://stackoverflow.com/questions/ask; and what I want to do is to get a match without the final ; character.
You can use a negated character class instead of
dot (.)at the end: –