Wildcard Functionality

wavemasta

Member
Joined
Feb 12, 2009
Messages
12
Programming Experience
10+
I was implementing some wildcard functionality in my application with the Regex class.

If I do something like this:

13.*.*; then it works the way I want. It removes anything beginning with 13.

Now when I try something like:

*.y.*

I get an error "quantifier following nothing" or something like that..

I tried using ^.y.*
I had no such luck.

And I get the same thing if I try

*.*.y

Any ideas to try?

Regards
 
Hello.

* is no wildcard in RegEx, have a look at the wikipedia article: [ame=http://en.wikipedia.org/wiki/Regular_Expressions]Regular expression - Wikipedia, the free encyclopedia[/ame]
You'll find there everything you need.

Bobby

P.s.: .NET does not support POSIX-Classes, use PERL instead.
 
No, I meant the POSIX-Character-Classes which are described in the article (f.e. [:word:]), .NET does not support those, you'll have to use the PERL (f.e. \w) class instead.

Bobby
 
Back
Top