Python Forum

Full Version: Python Regulare Expression
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have this code here and I want to know how to interpret it:
found = re.findall(
        r'encoding="UTF-8"\?>(.*?)^<\?xml version="1.0"', clean, re.M | re.S,
    )
I can see where "Clean" comes from, but not sure what is "re.M" and "re.S". Can I please get an explanation of the whole syntax.