Home > Common Problem > body text

What is the difference between wildcard characters * and ?

coldplay.xixi
Release: 2023-01-13 00:33:19
Original
61535 people have browsed it

The difference between wildcard characters * and ? is that "*" can be used to replace zero, single or multiple characters, while "?" can only be used to replace one character; "*" means that the number of matches is unlimited , while the number of matching characters for "?" is limited.

What is the difference between wildcard characters * and ?

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

The difference between wildcard characters "*" and "?" is that "*" can be used to replace zero, single or multiple characters, while "?" can only be used to replace 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", etc., while if you enter "comp?ter", you can only find Words such as "computer, computer, computer".

Extended information:

The wildcard characters mainly include asterisks (*) and question marks (?), which are used to fuzzy search files. When searching for folders , you can use it to replace one or more real characters; when you don’t know the real characters or are too lazy to enter the complete name, wildcards are often used to replace one or more real characters.

How to use wildcards - Fuzzy conditions Sum:

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 add all data containing "T-shirt" Find the quantity of "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

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

Related free learning recommendations: php programming (Video)

The above is the detailed content of What is the difference between wildcard characters * and ?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!