asp.net - Find/Replace Word Puzzle -
Suppose I have an object in which word property and sentence property are included. I should use the word in sentence, and I In that sentence, using a public function, I want to change the word with the link (eg, GetLinkedSentence). This catch probably uses a plural form of the word in the sentence, and perhaps the "word" is actually a phrase or even hyphenated too. There is no limit to the word. How can I find this word (in ASP.NET, preferably VB) with a link (www.example.com /? [Word])?
look at regx. Change the text in the system. Regulator Express Namespace
For example, to change the word "weather" in the sentence "weather is rain today." With the link, you can do something like:
RegEx.Replace (sSentence, "(weather (s)?)", "& Lt; a href = 'http: / /www.weather.com '> $ 1 & lt; / a & gt; ") The above regex will also change the simple multi-word (finally' with) you "Ez" can get more complex expressions for plurality
Comments
Post a Comment