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: 2949368 |
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 Windows 11 KB5014697 Contains Spotlight for Desktop & Bug Fixes - MiniTool
- 2 How do you remove elements from a Python list?
- 3 The 5 Essential Elements of Linux: Explained
- 4 Comparing SQL and MySQL: Syntax and Features
- 5 Xbox Adaptive Controller - Designed for Players with Disabilities - MiniTool
- 6 Using Git with GitHub: A Practical Guide
- 7 Wild Hearts Low FPS & Stuttering & Lag on Windows 10/11? [Fixed] - MiniTool
- 8 CHKDSK Unable to Determin Volume Version and State: Full Guide
- 9 Google Chrome Enterprise Download for Windows/Mac (64 & 32 Bit) - MiniTool
- 10 Microsoft PC Manager - Microsoft’s Own PC Optimizer for Win 10/11 - MiniTool
- 11 NGINX Unit: Streamlining Application Deployment
- 12 The Startup Options on This PC Are Configured Incorrectly? Quick Guide
- 13 What Does Shift F10 Do? Best Fixes for Shift F10 Not Working
- 14 The Power of Docker: Containerization Explained
- 15 Top 7 Free Online Android Emulators to Test Android Apps - MiniTool
Latest Tutorials
-
- Go language practical GraphQL
- 3255 2024-04-19
-
- 550W fan master learns JavaScript from scratch step by step
- 4585 2024-04-18
-
- Getting Started with MySQL (Teacher mosh)
- 2608 2024-04-07
-
- Mock.js | Axios.js | Json | Ajax--Ten days of quality class
- 3310 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 ($).
