I am trying to find the correct regular expression that detects string that end with a single underscore, e.g. hello_, this_
. So far I have re.match("[aA-zZ](_)", string)
but detects strings like, day__, ball__, i.e, with two underscores which i do not want. Any ideas how to get string with a single underscore in the end.
Thanks