Good day. Tell me, please, how can I implement the following idea in regular expressions:
All characters except the "=" sign, in front of which there is no "\" sign
I tried it like this, but did not achieve the proper effect:
(?<!\\)[^=]*
Good day. Tell me, please, how can I implement the following idea in regular expressions:
All characters except the "=" sign, in front of which there is no "\" sign
I tried it like this, but did not achieve the proper effect:
(?<!\\)[^=]*
If the question implies the full implementation of screening, then:
https://regex101.com/r/dG3bF4/1
(?:\\.|[^=])+ It reads like this:
Alternative from any escaped character, or any character other than = at least 1 time.
And if you just need to capture all the characters, or = in front of which there is no \ , then so:
https://regex101.com/r/dG3bF4/2
(?:[^=]|(?<=\\)=)+ It reads like this: a character other than = or = before which \ at least once.
(?:[^=]++|(?<=\\)=)+ and (?:\\.|[^=]++)+ will not work in .NET. Regex101 does not support .NET regular expression syntax. - Wiktor StribiżewSource: https://ru.stackoverflow.com/questions/537870/
All Articles