Python regular expression compilation option questions. a DOTALL question

Asked 2 years ago, Updated 2 years ago, 13 views

IGNORECASE stands for I MULTILINE stands for M, but why is DOTALL stands for S and VERBOSE stands for X?

python

2022-09-21 18:27

1 Answers

It's the language/library creator's mind, so no one knows, but if you read Official document original, you can roughly guess.

re.S
re.DOTALL
The special (s special) character . is matched to any character... (throw)

re.X
re.VERBOSE
This flag allows you to separate and annotate the logical parts of the pattern, making regular expressions easier to read and more formal . (Skipping)


2022-09-21 18:27

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.