Articles - Regular Expressions



This demo illustrates how to have words you searched on highlighted in the results of a DataGrid Web control. One caveat to note is that there can be a discrepency between the results returned by the search and the highlighted words. That is, if you search on "ant" the hit "It's not that I'm afraid to die. I just don't want to be there when it happens." will be returned because "ant" is a substring in the phrase (... just don't want to be ...). However, the letters won't be highlighted because the regular expression pattern matching is setup to ...Read more
Posted by: Michael
On 03 Nov 2011 | Views: 1206 | Categories: Regular Expressions, ASP.NET


Over the last couple of days I've seen numerous examples of people posting about how to count words in a sentence. Disturbingly, these postings recommend suggest counting the number of spaces in the sentence and use that as the basis of a word count.

You may be asking why this is a problem. Well, consider the following sentence:
The total number of words \t in this sentence,is 10. ...Read more
Posted by: Teena
On 31 Oct 2011 | Views: 1180 | Categories: Regular Expressions, C#
Page 1 of 1
Other lins

.Net Techies
Other lins