Created
April 9, 2019 18:04
-
-
Save gatamar/a0b6cbac1e901aae73103f679b24ea90 to your computer and use it in GitHub Desktop.
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
| import regex | |
| def try_recursive_regex(): | |
| text = "ababagalamaga1-ababagalamaga2-(werewr(o)(l)(i)(a))sdfsdf()()((((" | |
| pattern = "\((?>[^()]|(?R))*\)" | |
| res = regex.findall(pattern, text) | |
| print( res ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment