When attempting to search using Regular Expressions and built-in .NET character classes, I'm getting some errors back. For example, \p{Lu} works just fine when searching for uppercase letters, however \p{IsBasicLatin} is returning an error. Both should work with .NET by default as described here (http://msdn.microsoft.com/en-us/library/20bw873z%28v=vs.80%29.aspx).
Here's the exception I'm getting:
System.ArgumentException: Invalid Unicode category name.
Parameter name: categoryName
at ActiproSoftware.Text.RegularExpressions.CharClass.#mad(String #CCf)
at ActiproSoftware.Text.RegularExpressions.CharClass.AddCategory(String categoryName, Boolean negate)
at #kZc.#jE.#1U(Int32 #mvf, Boolean #YCf)
at #kZc.#jE.#1U(Int32 #mvf, Boolean #YCf)
at #kZc.#jE.#VU(String #UCf, Boolean #VCf, Boolean #WCf, CaseSensitivity #XCf)
at #kZc.#jE.#6U(String #UCf, Boolean #VCf, Boolean #WCf, CaseSensitivity #XCf)
at #2Yc.#fZc.#C7c(ISearchOptions #qgb)
at #2Yc.#fZc.#F7c(SearchOperationType #Myf, ITextSnapshot #I7b, ISearchOptions #qgb, Int32 #Oqc, Boolean #fCf, TextRange #eCf)
at #2Yc.#fZc.FindNext(ITextSnapshot #I7b, ISearchOptions #qgb, Int32 #Oqc, Boolean #fCf, TextRange #eCf)
at #Q2b.#JZc.FindNext(ISearchOptions #qgb, Int32 #Oqc, Boolean #fCf, TextRange #eCf)
at #Q2b.#JZc.FindNext(ISearchOptions #qgb, Int32 #Oqc, Boolean #fCf)
at fire.MainWindow.<>c__DisplayClass3b.<AdvancedSearch_ProcessAdvancedSearch>b__38(Object a, DoWorkEventArgs b)
Here's basically what I'm doing:
EditorSearchOptions eso = new EditorSearchOptions();
eso.FindText = "\p{IsBasicLatin}";
eso.MatchCase = false;
eso.PatternProvider = SearchPatternProviders.RegularExpression;
eso.SearchUp = false;
snapshot.FindNext(eso, offset, true);
Thanks