0

I have a text input in which I am accepting wildcards. Namely the * which matches any number of characters and the ? which matches exactly 1 character.

Is there a name for this wildcard system, which I could use as shorthand?

C:\Temp>dir * /b
bar
baz
buz
foo

C:\Temp>dir b* /b
bar
baz
buz

C:\Temp>dir b? /b
File Not Found

C:\Temp>dir ba? /b
bar
baz

  • This might should be asked elsewhere. If someone can direct me, I'd love to ask in the right area... – Jonathan Mee Sep 7 '18 at 15:02
  • Is your application a command-line program (your example has that appearance, but it might just be the way you formatted your example..)? If not, what kind of application is it? In what situation would the user possibly want to use these wildcards? – maxathousand Sep 7 '18 at 15:18
  • @maxathousand It's actually an API where a user passes a string across an interface, again... possibly not the right place to ask. I'm trying to give a common term in the caller could easily understand the wildcards. – Jonathan Mee Sep 7 '18 at 15:26
  • I think it's fitting here: developers are users too! These are the only two wildcards you support, correct? I'm a developer as well, but I'm not sure that there's a specific term I've come across that I'd be able to immediately understand "Oh, they mean * and ?." Do/will you have accompanying documentation for this API? It might be easy enough to just mention it in the documentation for the methods that support it, for example "Call this method, passing the desired query. Note: * will match any number of non-whitespace characters, while ? will match exactly one." Might this work? – maxathousand Sep 7 '18 at 15:34
  • @maxathousand Yeah each function in the API has a one line comment. I was hoping for something more intuitively obvious... but perhaps being explicit is our best bet here. – Jonathan Mee Sep 7 '18 at 17:22
2

I actually think the word "wildcard" is exactly the one you're looking for. It clearly indicates that it's not a regular expression/regex or glob type matching system that is more sophisticated.

In short, you could say:

This API treats * and ? as wildcard characters.

And elsewhere explain how they behave more specifically.

  • Agreed, and put a little 'info' icon on the page so that anyone who has never heard of wildcards can learn about them. – PhillipW Sep 9 '18 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.