const string strRegex = @"(?.+) ?(bis|zu)? (?[\d.,]+) eur";
searchQuery = RemoveSpacesFromString(searchQuery);
Regex regex = new Regex(strRegex, RegexOptions.IgnoreCase);
Match m = regex.Match(searchQuery);
ComplexAdvertismentsQuery query = new ComplexAdvertismentsQuery();
if (m.Success)
{
query.CountryName = m.Groups["city_country"].Value;
query.CityOrAreaName = m.Groups["city_country"].Value;
query.PriceFrom = Convert.ToDecimal(1);
query.PriceTo = Convert.ToDecimal(m.Groups["price"].Value);
}
else
return null;
return query;
my search string is "Agadir ca. 600 eur" but "ca." is not "bis" or "zu" and regex is also true. What is wrong with regex? I want that regex is true only if is word "bis" or "zu".
I think this is worng
?(bis|zu)?
JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)