I need to split data by dot. And I have escaped dot(.), that I should ignore. Also I should ignore escaped backslash too (\). For example,
data1\\.d\\\\\.ata2\\\\.da\.ta3.data4
This string should be splitted to for substrings like as
data1\\
d\\\\\.ata2\\\\
da\.ta3
data4
I cannot to create regex for that. Do you know, it is possible? I tried to use following:
(?<!\\((\\\\){2,}))\\. - not working
I can create following regex if escaped slash defined only one time:
"((?<!\\\\)\\.)|((?=([^\\\\]*((\\\\\\\\)+[^\\\\]*)))\\.)";
For example data1\\.d\.ata2.da\.ta3.data4 splitted correctly:
data1\\
d\.ata2
da\.ta3
data4
But I cannot detect backslash definition even number times. Can you help me, please? Thank you!