Using Python 3 consider this regex:
[\||JI|\[|\]NL\||JI|\[|\]]
This will be deployed against a string such as:
INLI VERONICA HD / DISNEY XD
Python used:
import re
new_string = re.sub("[\||JI|\[|\]NL\||JI|\[|\]]", "", old_string)
print(new_string)
Expected output:
VERONICA HD / DISNEY XD
Actual output:
NL VEROCA HD / DSEY XD
To ad some context, NL could be wrapped in any combination of the characters J, I, |, [ and ], hence the either or options supplied in the regex. Anyone suggest how to amend to get the desired output?
Thanks