|
|
![]() |
|
|
Top | #1 |
|
OSNN Addict
Joined: August 2005
Posts: 94
Reputation: 10
Power: 83 |
How would I use regular expressions to remove the contents in parenthesis in a string in C# like this: "SOMETHING (#2)" |
|
|
|
|
|
Top | #2 |
|
OSNN Addict
Joined: August 2005
Posts: 94
Reputation: 10
Power: 83 |
According to:
Regex Class (System.Text.RegularExpressions) I have gotten some results like this: string pattern = @"\(#\d+\)"; Regex rgx = newRegex(pattern, RegexOptions.IgnoreCase); MatchCollection matches = rgx.Matches(interesting_string); But I do not know what to do with the matches or what to do after this. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Regular expression generator | LordOfLA | Web Design & Coding | 0 | June 24th, 2009 6:02pm |
| Merging Expression Web with Office 2007? | Eiji | Windows Applications | 1 | July 12th, 2008 9:44pm |
| Microsoft Expression Line | kcnychief | Web Design & Coding | 6 | February 8th, 2007 10:48pm |
| Microsoft to launch Expression Studio in 2007 | deboz | Web Design & Coding | 10 | December 6th, 2006 1:01am |
| Microsoft Expression Web Beta 1 | kcnychief | Windows Desktop Systems | 6 | September 11th, 2006 7:02pm |