A
A
anonymous2017-10-31 11:28:09
.NET
anonymous, 2017-10-31 11:28:09

Why doesn't want to parse string(Regex)?

There is a line like
\nWIKI/NYRT,\"New York REIT Inc (NYRT) Prices, Dividends, Splits and Trading Volume\"\nWIKI/OPWR,\"Opower Inc (OPWR) Prices, Dividends, Splits and Trading Volume\"\ n
I use a regular expression with a pattern

string pattern = "/(.*?)[\\/]([A-Z]*)(,.)(\".*?\")/gm";
Regex regex = new Regex(pattern);

On Regex101.com everything works fine
In the code for some reason there is no
problem What is the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Nemiro, 2017-10-31
@anonymouss

string pattern = " / (.*?)[\\/]([AZ]*)( ,. )(\".*?\") /gm ";

string pattern = "(.*?)/([A-Z]*)(,|.)(\".*?\")";
var regex = new Regex(pattern, RegexOptions.Multiline);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question