I\'d like to use a variable inside a regex, how can I do this in Python?
variable
regex
Python
TEXTO = sys.argv[1] if re.search(r\"\\b(?=\\
you can try another usage using format grammer suger:
format
re_genre = r'{}'.format(your_variable) regex_pattern = re.compile(re_genre)