How, using regular expressions, to set the pattern of the form:
Начало ... конец ,
where ... these are any characters including spaces, underscores and integers, and how many are unknown. I'm trying to do it like this:
var pattern = new Regex(@"Start:\S*\s*End"); because \S* - zero or more characters is not a space and \s* - zero or more characters are. However, this is wrong. How to fix ?
^Start:.*End$- so try..- any character. The quantifiers^and$are the beginning and end of the string, respectively. - Andrew NOPStart:andEnd? Aah, you need a lazy quantifier :) Well, yes, the answer will suit you Wiktor Stribiżew - Andrey NOP