1

Good morning I have the following problem, I want to build the following regular expression: pattern = re.compile ('[/*AB] P79CAN01 [#] ?'), where the value of "P79COL01" comes from a variable, for example I have the variable:

equipo = 'P79CAN01', but I don't know how to enter it into re.compile

equipo='P79CAN01';

patron=re.compile('[/*AB]P79CAN01[#]?')

I saw that you already asked the question at How do I put a variable inside a string?, but I did not understand much the answer, besides it is quite old

Cesar Justo
  • 707
  • 2
  • 11
  • 35

0 Answers0