Pattern=re.compile (ur "[({] [^ () () {}] * [)}\])]") does not understand

pattern=re.compile(ur"[(\[{][^(){}]*[)}\]]")
all_subs=pattern.split(cell_text)

what do you mean by solving these two lines of code

Mar.17,2021

this regular expression is used to match a paragraph in parentheses, preceded by

.
[(\[{]

matches the left parenthesis, the middle paragraph

[^(){}]*

matches any number of characters that are not parentheses, with the last

[)}\]]

matches the right parenthesis. The reason why the left parenthesis and the right parenthesis are so long and regular is to be compatible with parentheses, square braces and curly braces, and even Chinese parentheses.

pattern.split uses this regular expression to separate the following cell_text into an array. I'll give you an example to show you:

clipboard.png

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e54c8f-452cd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e54c8f-452cd.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?