In Python there is a special sequence \w for matching alphanumeric and underscore when the LOCALE and UNICODE flags are not specified.
Example
import re result = re.search(r'^\w+$', 'Tutorials123') print result.group()
Output
Tutorials123
In Python there is a special sequence \w for matching alphanumeric and underscore when the LOCALE and UNICODE flags are not specified.
import re result = re.search(r'^\w+$', 'Tutorials123') print result.group()
Tutorials123