current location: Home > Download > Learning resources > Web page production > Regular quick start + commonly used expressions

Regular quick start + commonly used expressions
Classify: Learning materials / Web page production | Release time: 2018-01-20 | visits: 2949346 |
Download: 166 |
Latest Downloads
Horror Beat Phase Maker
Himalayan Children
Zebra AI
Supermarket Manager Simulator
Red Alert Online
Delta Force
Pokémon UNITE
Fantasy Aquarium
Girls Frontline
Wings of Stars
24 HoursReading Leaderboard
- 1 How to fix error 1628: Failed to complete installation error in Windows?
- 2 6 Reasons to Avoid Buying a Used Phone
- 3 How to find my games on Windows 10/11?
- 4 How to uninstall MS Edge (Chromium) in Windows?
- 5 Fix Windows Keeps Assigning Drive Letter to Recovery Partition
- 6 Virtual currency trading platform app ranking Rui
- 7 Top 10 official virtual currency trading apps Top 10 official virtual currency trading platforms for mobile phones
- 8 Top 10 virtual currency trading app rankings Top 10 virtual currency trading app recommendations
- 9 A summary of the top ten virtual currency trading platforms apps, ranking of the top ten virtual currency trading platforms 2025
- 10 Which of the top ten virtual currency trading apps is the best? Which of the top ten virtual currency trading apps is the most reliable
- 11 What is the current price of Bitcoin?
- 12 The difference between Ether and Bitcoin What is the difference between Ether and Bitcoin
- 13 Top 10 virtual currency trading platform app rankings Top 10 virtual currency trading platform rankings
- 14 How to choose an exchange for currency trading
- 15 What are the advantages and disadvantages of controlled and uncontrolled components?
Latest Tutorials
-
- Go language practical GraphQL
- 2984 2024-04-19
-
- 550W fan master learns JavaScript from scratch step by step
- 4324 2024-04-18
-
- Getting Started with MySQL (Teacher mosh)
- 2334 2024-04-07
-
- Mock.js | Axios.js | Json | Ajax--Ten days of quality class
- 3075 2024-03-29
First, let’s briefly introduce regular expressions:
When writing programs or web pages that process strings, there is often a need to find strings that match certain complex rules. Regular expressions are tools used to describe these rules. In other words, regular expressions are codes that record text rules.
Let’s take a look at what the messy characters in regular expressions mean:
1. Commonly used metacharacters
. Matches any character except newlines
\w matches letters or numbers or underscores or Chinese characters
\s matches any whitespace character
\d matches digits
\b matches the beginning or end of a word
^ Matches the beginning of a string
$ Matches the end of the string
Then let’s try to understand:
\bhello\b actually searches for the word hello - first the beginning of a word (\b), then the string hello, and finally the end of the word (\b).
010-\d\d\d\d\d\d\d\d For example, Beijing's landline phone number - first 010-, then 8 digits (\d).
^\d{18}$ For example, the ID number - first the string starts (^), then the 18-digit number (\d), and finally the string ends ($).
