Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are wildcards and regular expressions?

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)05/31 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report