|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Regular Expression Excluding Exact StringI have been trying to put together a regular expression that will trap any
string with the exact string "&#" (without the quotes) and have been having no luck. Can anyone tell me if this is possible or not? Even better, can anyone show the regular expression I am looking for? Thank you, Ross Ylitalo ross.ylitalo@gmail.comnospamplease If I understand you, you are looking to find any string that contains
"&#" e.g. "&#" "&#abc" "abc&#" "abc&#abc" Where "abc" can be any characters. Regex-wise you might try .*[&][#].* but unless you have an overriding need to use regular expressions, you might try the string function IndexOf() e.g. Dim str as string = "abc&#abc" MessageBox.Show(str.IndexOf("&#")) If found, IndexOf() returns the 0-based index of the first char (i.e. 3 in the above example) or -1 if not found. hth, Alan.
Calling API functions dynamically?
arrghh dot vs comma How to have a clean exit Thread takes up 100% CPU SortCompare of DataGridView - how to? Want to Eary Bind Instead of Late Bind Object an IE Object Caret Hiding Setting tab stops in RTF control Help: Control loops & properties in VB .Net 2005 Query based of a value in a combo box |
|||||||||||||||||||||||