When using some regex in C #, I have the following problem:
Consider this simple line: ~ 0 ~ This is plain text ~ POP ~ NIZ ~ 0 ~ 0 ~
I would like to select any lines between two "~" containing more than three characters, except, of course, "~". In my example, this would be:
This is plain text.
I could do something like: ([\ w] | [\ d] |. | \, .................) {4-500}
I would end a very long regular expression, it is impossible to debug and not read ...
Instead, I would prefer to create a regular expression, for example, "Give me any characters except" ~ ", which is between" ~ "and" ~ " .
I can’t find a way to use [^] correctly!
How can i do this?
Thanks in advance!
ANSWER: I finally did this: ~ [^ ~] {3,} ~
Everything except '~' is required, contained between two ~ ~ characters and more than three characters long.
Thank you for your responses!
source
share