Created
August 22, 2018 10:07
-
-
Save nooperpudd/d3d08d3c5ee1dc87c2a8bd96838969fe to your computer and use it in GitHub Desktop.
python regex
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [69]: regex = re.compile(r"\{(.*\n?)\}", re.S) | |
In [70]: eee= re.findall(regex,"{ dsfdsads fdsdsafd dsddfs; { sdfssdaf; }}") | |
In [71]: eee | |
Out[71]: [' dsfdsads fdsdsafd dsddfs; { sdfssdaf; }'] | |
In [72]: eee= re.findall(regex,"{ dsfdsads fdsdsafd \n dsddfs; { sdfssdaf; }}") | |
In [73]: eee | |
Out[73]: [' dsfdsads fdsdsafd \n dsddfs; { sdfssdaf; }'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment