I am using regex in C#
I need to parse a string till it matches |
I tried both but did not work:
Regex reg = new Regex("Screen.*?|");
and
Regex reg = new Regex("Screen.[^|]*");
the code is working but does not match anything.
how can I do that work??
|is a special character in regular expressions; you need to escape it with a backslash.