Re: re.DOTALL enabled all the time?
David Rock <[email protected]> Mon, 10 Mar 2025 13:28:57 -0500
| Newsgroups | gmane.comp.python.tutor |
|---|---|
| Message-ID | <[email protected]> |
* David Rock <[email protected]> [2025-03-10 13:00]: > I was trying to help someone understand matching across newlines with . and > came across something strange. Best I can tell, it looks like re.DOTALL is > always active. So, of course I found the answer to at least part of this immediately after posting. I was testing with a raw string which means there are no escape codes and \n is just characters, not a newline. So that mystery is solved. That does still leave the following question though. Is there a way to see what flags were used in a match/search? -- David Rock [email protected] _______________________________________________ Tutor maillist - [email protected] To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor