1
I have the following expression:
(?!.*");
it captures anything that is separated by the character ;
except when ta inside a string. Here’s an example:
ABC; #captura o último ;
123; #captura o último ;
"XYZ"; #captura o último ;
"A B; C"; #captura apenas o último ; não o que está dentro da string
"Uma string #
com ; várias #esse aqui é capturado
linhas;"; #captura o último ;
Let’s look at this last item on the list:
"Uma string
com ;(1) várias
linhas;(2)";(3)
And what is returned are the semicolons 1 and 3. Where’s the bug? How do I fix? I prefer the answer with the . NET Framework
These examples are what the regex ago or what should do? First you say that regex captures "anything that is separated by the character
;
", but then you say the regex only captures the;
. Try to explain better what happens now and what you want it to happen.– dcastro
These examples are showing that he did
– CypherPotato