ignore-case

Ignore case using boost::regex_search

戏子无情 提交于 2019-12-23 07:38:41
问题 How do you use boost::regex_search with the ignore case flags or constants in C++? Please post an easy example. Thanks! 回答1: You need something like this boost::regex regex("your expression here", boost::regex::icase); boost::smatch what; string mystring; bool search_result = boost::regex_search(mystring.begin(),mystring.end(), what, regex); 回答2: Or something like this (without setting boost::regex::icase ): boost::regex regex("(?i)expression"); boost::smatch what; string mystring; bool

How to ignore case using breeze FilterQueryOp

人走茶凉 提交于 2019-12-22 06:22:27
问题 I am using breeze to query data from the server and seem to be running into problems. Is there a way to filter this data and ignore cases or making the value from the field a lower case? Example: var term = "john"; query = query.where("Name", "contains", Term); The problem I am having is if the 'Name' field contains John with capital 'J', It return false but returns true if I change term to 'John'. I know this is case issue but how can I make breeze ignore the casing? without using jquery

Ignoring case in strings with unitils ReflectionComparator

我与影子孤独终老i 提交于 2019-12-11 03:32:41
问题 I'm using unitils tool for deep objects comparing, via ReflectionComparator : ReflectionComparatorMode[] modes = {ReflectionComparatorMode.LENIENT_ORDER, ReflectionComparatorMode.IGNORE_DEFAULTS}; ReflectionComparator comparator = ReflectionComparatorFactory.createRefectionComparator(modes); Difference difference = comparator.getDifference(oldObject, newObject); It turns out that this ReflectionComparator doesn't ignore case in String fields values. And there isn't sprecial mode for this

Apache: How to rewrite URL with no file extension and ignore case?

北战南征 提交于 2019-12-10 10:27:50
问题 I'm running Ubuntu 12.04 with Apache 2.2.22 and PHP 5.3.10. I'd like users to be able to request pages on my site without having to type the '.php' extension, and without having to worry about case sensitivity. For example, URLs like these... http://www.site.com/test/phpinfo http://www.site.com/test/PhPiNfO ...should both lead to: http://www.site.com/test/phpinfo.php I started with case insensitivity by following the accepted answer in this question. Here's what my '/etc/apache2/sites

Linq: using StringComparer with GroupBy/Distinct in query syntax

别说谁变了你拦得住时间么 提交于 2019-12-08 11:44:31
问题 I have this (XLinq) query and was wondering how to convert it to the query syntax: var grouped = doc.Descendants() .GroupBy(t => t.Element(ns + "GroupingAttr").Value, StringComparer.OrdinalIgnoreCase); This is the query syntax without the StringComparer: var grouped = from t in doc.Descendants() group t by t.Element(ns + "GroupingAttr").Value into group select group My groupby is a little more complicated than this, so I prefer to use the key of the group instead of introducing a new property

Apache: How to rewrite URL with no file extension and ignore case?

﹥>﹥吖頭↗ 提交于 2019-12-05 23:57:11
I'm running Ubuntu 12.04 with Apache 2.2.22 and PHP 5.3.10. I'd like users to be able to request pages on my site without having to type the '.php' extension, and without having to worry about case sensitivity. For example, URLs like these... http://www.site.com/test/phpinfo http://www.site.com/test/PhPiNfO ...should both lead to: http://www.site.com/test/phpinfo.php I started with case insensitivity by following the accepted answer in this question . Here's what my '/etc/apache2/sites-available/default' file looks like... <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var

Getting gVim's vimdiff to ignore case

社会主义新天地 提交于 2019-12-05 16:42:20
问题 I am trying to compare two assembly files where one was written all caps and the other in lowercase. Many lines are identical up to case and whitespace. I tried the following, while two buffers in diff mode: :set diffopt+=icase :set diffopt+=iwhite :diffupdate The whitespace thing seems to work well, but the ignore case does not do its work. For example, in the following two lines: I0=R0; // ADDRESS OF INPUT ARRAY i0 = r0; // address of input array [the first line begins with 12 spaces, the

How to ignore case using breeze FilterQueryOp

北城余情 提交于 2019-12-05 08:49:10
I am using breeze to query data from the server and seem to be running into problems. Is there a way to filter this data and ignore cases or making the value from the field a lower case? Example: var term = "john"; query = query.where("Name", "contains", Term); The problem I am having is if the 'Name' field contains John with capital 'J', It return false but returns true if I change term to 'John'. I know this is case issue but how can I make breeze ignore the casing? without using jquery.each. Thanks. Any help will be greatly appreciated. Ok, there are two parts to this. Breeze supports a

Regex options matching multi-line as well as ignoring the case

时光总嘲笑我的痴心妄想 提交于 2019-12-04 04:05:19
问题 I have some piece of ill-formed html, sometimes the " is missing. Also, it sometimes shows capital cases while other times lower cases: <DIV class="main"> <DIV class="subsection1"> <H2> <DIV class=subwithoutquote>StackOverflow</DIV></H2></DIV></DIV> I would like to match both multi-line and ignoring the case. But the following patern does not seem to be working. (For the concatenation, I also tried | instead of &) const string pattern = @"<div class=""?main""?><div class=""?subsection1""?><h2

Getting gVim's vimdiff to ignore case

微笑、不失礼 提交于 2019-12-04 01:26:18
I am trying to compare two assembly files where one was written all caps and the other in lowercase. Many lines are identical up to case and whitespace. I tried the following, while two buffers in diff mode: :set diffopt+=icase :set diffopt+=iwhite :diffupdate The whitespace thing seems to work well, but the ignore case does not do its work. For example, in the following two lines: I0=R0; // ADDRESS OF INPUT ARRAY i0 = r0; // address of input array [the first line begins with 12 spaces, the second with a single tab] Why? What can I do? UPDATE: just noticed that in these two lines all