For eg:
I have wildcard pattern to find UK format dates
Wildcard pattern : [0-9]{1,2}[dhnrst]{2} <[AFJMNSOD]*> [0-9]{4} // this pattern will find the UK format date "7th August 2001"
Out put also will find the UK format dates, but out put should be in regex format as follows.
\b[0-9]{1,2}[th|rd]+\s[\w]+\s[0-9]{4}\b // this regex pattern also will find the UK date format "7th August 2001"
Please suggest me how to bring this output using c#. (Except string find and replacement method)

VulpesPosted Jun 15, 2014, 1:00 PM
A similar approach could be used to map a regular expression to an MS wildcard expression provided the former doesn't include any features which can't be represented in the latter such as alternation, optional characters, look-ahead, look-behind etc.
Penikton BernardPosted Jun 16, 2014, 10:00 AM
Penikton BernardPosted Jun 12, 2014, 8:39 AM
Penikton BernardPosted Jun 12, 2014, 8:37 AM
VulpesPosted Jun 12, 2014, 8:25 AM
Do you have a link to documentation on the wildcard pattern or is the above example all you have to work from?
Penikton BernardPosted Jun 12, 2014, 7:58 AM
VulpesPosted Jun 12, 2014, 5:49 AM
You can write the whole lot as a single string if you like.
The reason why I say this is more comprehensive than the wildcard pattern is that the latter would validate something like: 0dn Application 0000 as a valid UK format date.
So you really need something better than this.
Penikton BernardPosted Jun 11, 2014, 6:14 AM
VulpesPosted Jun 10, 2014, 6:06 PM
The only problem it has is that it will always validate February 29th even if it's not a leap year.
If you don't want matches to be case insensitive, then just remove the (?i) from the regular expression.
The output is:
Penikton BernardPosted Jun 10, 2014, 7:10 AM
Thanks a lot for looking my post, The input string should be a pattern its either regex or wildcard Its should not be the normal text
Khan Abrar AhmedPosted Jun 10, 2014, 7:04 AM
http://stackoverflow.com/questions/5899794/match-and-replace
http://stackoverflow.com/questions/6005609/replace-only-some-groups-with-regex
http://stackoverflow.com/questions/474335/using-regex-to-edit-a-string-in-c-sharp
VulpesPosted Jun 10, 2014, 6:57 AM
However, as I'm sure you know, these patterns are far from perfect and it would be possible to come up with a more accurate regular expression if that were needed.