Quantcast
Viewing all articles
Browse latest Browse all 12

Answer by Anders Zommarin for Need to perform Wildcard (*,?, etc) search on a string using Regex

d* means that it should match zero or more "d" characters. So any string is a valid match. Try d+ instead!

In order to have support for wildcard patterns I would replace the wildcards with the RegEx equivalents. Like * becomes .* and ? becomes .?. Then your expression above becomes d.*


Viewing all articles
Browse latest Browse all 12

Trending Articles