ASH
ASH

Reputation: 20302

Weird issue with regex match

I'm testing some regex. It looks like this part is getting cut off: ing.*_{FD_YYYYMMDD}.*

Am I doing something wrong here?

Upvotes: 0

Views: 52

Answers (1)

abacabadabacaba
abacabadabacaba

Reputation: 2692

What you are seeing is a string representation of a match object. It should only be used for debugging, and it is truncated.

To see the string captured by a group (green), call re.search(pattern, string).group(1)

Upvotes: 3

Related Questions