Home>Article> What do the wildcard characters * and ? mean when searching for files?

What do the wildcard characters * and ? mean when searching for files?

青灯夜游
青灯夜游 Original
2022-07-25 11:43:02 46408browse

The wildcard "*" can represent any string and can match zero, single or multiple characters; while the wildcard "?" only represents a single string, and this word must exist. Wildcard is a special statement, mainly including asterisk "*" and question mark "?", used to fuzzy search files; the number of matches for "*" is not limited, while the number of matching characters for "?" is limited. When looking for a folder, you can use it to replace one or more real characters; when you don't know the real characters or you are too lazy to enter the full name, you often use wildcards to replace one or more real characters.

What do the wildcard characters * and ? mean when searching for files?

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

When searching for files, the wildcard character*can represent any string;?only represents a single string, but this word must exist.

Wildcard is a special statement, mainly asterisk (*) and question mark (?), used to fuzzy search files. When looking for a folder, you can use it to replace one or more real characters; when you don't know the real characters or you are too lazy to enter the full name, you often use wildcards to replace one or more real characters.

In fact, "*Not?pad" can correspond to Notepad and MyNotepad; Notep[ao]d can correspond to Notepad and Notepod [ao represents one of a and o], and the rest And so on.

What do the wildcard characters * and ? mean when searching for files?

The difference between wildcard characters "*" and "?"

"*" can be used to replace zero, single or multiple characters, while "?" can only be used in place of one character. "*" means that the number of matches is unlimited, while "?" means that the number of matching characters is limited.

This technique is mainly used in English searches. For example, if you enter ""computer*", you can find words such as "computer, computers, computerised, computerized", and if you enter "comp?ter", you can only find Words such as "computer, computer, computer".

Extended information:

How to use wildcards - summation of fuzzy conditions:

1. For example Requirement: Find the total quantity of "T-shirts" included in the product

You need to sum up the total quantity of T-shirts in the item column, enter the formula: =SUMIF(A2:A18,"*T-shirt* ",D2:D18) Because we are not sure whether there is other data before and after "T-shirt", so the condition is "*T-shirt*", then we can find the quantity of all the numbers containing "T-shirt".

2. For example, ask: Find the total quantity corresponding to the last word in the product is "skirt", and the cell is 5 characters

Enter the formula in the item column: =SUMIF(A2:A18," ????skirt", D2:D18), because it must be 5 characters and the last one is "skirt", so the condition input "????skirt" 1 "? "Represents any 1 character.

For more related knowledge, please visit theFAQcolumn!

The above is the detailed content of What do the wildcard characters * and ? mean when searching for files?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn