I am trying to use regex to split this string
\r\r\nabc:\r\r\n\tdef ghi:\t\tS-1-5-18\r\r\n\tlll zzz:\t\tstring1\r\r\n\t
into
abc:\r\r\n\t
def ghi:\t\tS-1-5-18\r\r\n\t
tlll zzz:\t\tstring1\r\r\n\t
However, my current regex using lookahead only seem to be able to match this string
nabc:\r\r\n\tdef gh
regex : \w+:[\w\\n\\r \\t]+(?=[\\t]+[\w]+:)
I am using https://regex101.com to evaluate on this string.
Can i know what am i doing wrong?
Thanks
Using this in python throws up a unbalanced paranthesis exception
re.split('(?<!\\)[\w\s]+\:[\w\\\s\-]+\\t', string_to_split)
(?<!\\)[\w\s]+\:[\w\\\s\-]+\\t
this one can match all of 3 string
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With