Using Regex to find a Match
-
Hi Guys, Please could someone assist me... I am trying to extract the text placed between i love puppies using regex. I have html in a variable and i am trying to establish whether an anchor tag exists in this string that contains "i love puppies" or if need be "love puppies". I have attempted to using this MatchCollection mAnchor = Regex.Matches(originalStr, @"(<a[^>]*> ('text'[^<]*) </a>)*", RegexOptions.IgnoreCase); but due to my lack of deeper understanding of regex...i have not been successful... Thank you in advance, Butch
-
Hi Guys, Please could someone assist me... I am trying to extract the text placed between i love puppies using regex. I have html in a variable and i am trying to establish whether an anchor tag exists in this string that contains "i love puppies" or if need be "love puppies". I have attempted to using this MatchCollection mAnchor = Regex.Matches(originalStr, @"(<a[^>]*> ('text'[^<]*) </a>)*", RegexOptions.IgnoreCase); but due to my lack of deeper understanding of regex...i have not been successful... Thank you in advance, Butch
Are "love puppies" a pseudonym? Never, mind I don't want to know... Try Expresso [^]- examines and generates Regular expressions. I use it all the time for regex creation. It also has a small library which may help.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced. This message is made of fully recyclable Zeros and Ones
-
Hi Guys, Please could someone assist me... I am trying to extract the text placed between i love puppies using regex. I have html in a variable and i am trying to establish whether an anchor tag exists in this string that contains "i love puppies" or if need be "love puppies". I have attempted to using this MatchCollection mAnchor = Regex.Matches(originalStr, @"(<a[^>]*> ('text'[^<]*) </a>)*", RegexOptions.IgnoreCase); but due to my lack of deeper understanding of regex...i have not been successful... Thank you in advance, Butch
We would need to see examples of the text you are trying to parse.