Jun-10-2020, 03:36 AM
HI i have question on regular expression
i am trying to match the text using re.search
example: original text = '[SYS_1] system application [END]'
Api text = '[ABCD_1] application [END]'
i use to match original like : found_text = re.search(REG_EXP, text)
REG_EXP = r"(\[\s*SYS_\d+\s\*].*\[\s*END\s*\])
How do we match using same or modify the regular expression for Api text.
Any one can help.
i am trying to match the text using re.search
example: original text = '[SYS_1] system application [END]'
Api text = '[ABCD_1] application [END]'
i use to match original like : found_text = re.search(REG_EXP, text)
REG_EXP = r"(\[\s*SYS_\d+\s\*].*\[\s*END\s*\])
How do we match using same or modify the regular expression for Api text.
Any one can help.