current location: Home > Download > Learning resources > Web page production > How to write regular expressions
![How to write regular expressions](https://img.php.cn/upload/webcode/000/000/000/5a61b38f19a9c266.png)
How to write regular expressions
Classify: Learning materials / Web page production | Release time: 2018-01-19 | visits: 2953524 |
Download: 164 |
Latest Downloads
Red Alert Online
Delta Force
Pokémon UNITE
Fantasy Aquarium
Girls Frontline
Wings of Stars
Little Flower Fairy Fairy Paradise
Restaurant Cute Story
Shanhe Travel Exploration
Love and Producer
24 HoursReading Leaderboard
- 1 NYT Connections Answers And Hints - February 17, 2025 Solution #617
- 2 Roblox Fisch: Ashfall Event Guide
- 3 Avowed: Dawnshore Pargrun Cache Exploration Guide
- 4 A Guide to Proper Error Handling in JavaScript
- 5 Hello Kitty Island Adventure: Reboot The Robots Quest Walkthrough
- 6 Building a VPS with WordPress on a LEMP Stack
- 7 How to Test Your JavaScript with Selenium WebDriver and Mocha
- 8 Deploy Fault Tolerant, Load Balanced Web Apps on Alibaba Cloud
- 9 A Guide to Setting Up Let's Encrypt SSL on Shared Hosting
- 10 Hello Kitty Island Adventure: All Spooky Swamp Puzzle Room Locations And Solutions
- 11 Getting Started with Python and MongoDB
- 12 How to Use Service Workers to Communicate Across Browser Tabs
- 13 Adding Animations for Effective Blog Posts with WordPress and Tumult Hype
- 14 Drupal 8 Third Party Settings and Pseudo-Fields
- 15 Java and MongoDB 4.0 Support for Multi-document ACID Transactions
Latest Tutorials
-
- Go language practical GraphQL
- 2750 2024-04-19
-
- 550W fan master learns JavaScript from scratch step by step
- 4130 2024-04-18
-
- Getting Started with MySQL (Teacher mosh)
- 2225 2024-04-07
-
- Mock.js | Axios.js | Json | Ajax--Ten days of quality class
- 2985 2024-03-29
In literal mode, all the contents wrapped between // are metacharacters, some have special meanings, and most of them are ordinary metacharacters that represent their own meaning
varname ='wo';
varreg = /^\d " name "\d $/
In order to solve the above-mentioned need to add a variable to the regular expression, we can only use the instance creation method
varreg =newRegExp("^\\d " name "\\d $","g")
What is the difference between literal method and instance creation method in regular expressions?
1. Everything that appears in the literal method is metacharacters, so variable values cannot be spliced, but the instance creation method is possible.
2. Just write \d directly in the literal, but in the example it needs to be translated as \\d
![](/static/newDowns/images/images/book.png)