C# Source Code: Re: Using RegEx to create a
[
Home
|
Contents
|
Search
|
Reply
|
Previous
|
Next
]
C# Source Code
Re: Using RegEx to create a
By:
stefan
Email (spam proof):
Email the originator of this post
Date:
Wednesday, December 22, 2004
Hits:
1044
Category:
General/Framework
Article:
Hi andrew! nice idea, but the problem is that u dont save the pattern matching characters properly. in the end u replace ALL pattern matching chars through a "*.", see >> //Replace the temp strings back with the required regular expressions >> pattern = pattern.Replace(@"?",@".*"); << !!! >> pattern = pattern.Replace(@"?",@"[A-Za-z]"); >> pattern = pattern.Replace(@"?",@"[0-9]+"); ... u should escape the whole pattern string first and then replace the escaped pattern matching chars through corresponding regex chars, like "\*" or "\x2A" through "*". thx for the idea!
Terms and Conditions
Support this site
Download a trial version of the best FTP application on the internet