What are wildcards and regular expressions?
This article shares with you what wildcards and regular expressions have. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
1. Wildcard is the meaning of universal card.
* means to match any character of any length
? Indicates that it matches an arbitrary character
[...] Matches any of the characters listed in parentheses
[!..] Indicates that any of the characters listed in parentheses do not match
two。 Regular expression (regular expression) A string matching pattern standard
2.1. Collection symbol []
[abc] character set (a, b, or z)
[^ abc] negative character set (any character except abc)
2.2. Common metacharacters
^ matches the beginning of the string
The end of the $matching string
\ b match the beginning or end of a word
2.3. Common qualifier {}
{n} repeat n times
{n,} repeat n or more times
{n ~ m} repeat n to m times
2.4. Greed and laziness?
{n,m}? Repeat n to m times, but repeat as little as possible
{n,}? Repeat more than n times, but repeat as little as possible
Thank you for reading! This is the end of this article on "what are wildcards and regular expressions?". I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it for more people to see!