this should do the trick
m = re.findall ( '<!--(.*?)-->', string, re.DOTALL)
More Related Contents:
- Searching for IP addresses in a file
- Finding the longest substring of consecutive letters in python
- How to use a variable inside a regular expression?
- Regular expression to return text between parenthesis
- How to match any string from a list of strings in regular expressions in python?
- Python regex for unicode capitalized words
- Regular expression parsing a binary file?
- python-re: How do I match an alpha character
- FutureWarning: The default value of regex will change from True to False in a future version
- match dates using python regular expressions
- Issue with regex backreference in Python
- Python TypeError on regex [duplicate]
- A simple maths operation on a CSV column using python [closed]
- Why am getting an "elif" syntax error showing invalid syntax in python [closed]
- Why is the id of a Python class not unique when called quickly?
- Freezing/Hanging tkinter GUI in waiting for the thread to complete
- Python: How to match nested parentheses with regex?
- How can I connect to MySQL in Python 3 on Windows?
- Regex: AttributeError: ‘NoneType’ object has no attribute ‘groups’
- remove unicode emoji using re in python
- The fastest way to read input in Python
- Why np.hypot and np.subtract.outer very fast compared to vanilla broadcast ? Using Numba for speedup numpy in parallel for distance matrix calculation
- matplotlib: plot multiple columns of pandas data frame on the bar chart
- How to prevent BrokenPipeError when doing a flush in Python?
- What does *tuple and **dict mean in Python? [duplicate]
- Why isn’t the regular expression’s “non-capturing” group working?
- How do you change the value of one attribute by changing the value of another? (dependent attributes)
- Python: How to read and load an excel file from AWS S3?
- Splitting a math expression string into tokens in Python
- Download all pdf files from a website using Python