current location: Home > Download > Learning resources > Web page production > How to write regular expressions

How to write regular expressions
Classify: Learning materials / Web page production | Release time: 2018-01-19 | visits: 2953559 |
Download: 164 |
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 Google's Pixel 9a Lacks More Features Than You Think
- 2 How to Get Coin Master Free 5000 Spin Link
- 3 The current Bitcoin (BTC) bear market
- 4 Organize your Mac menu bar with Bartender
- 5 Epic Games Store on Android Now Gives Away Two Free Games Each Week
- 6 How to screen share on a Mac
- 7 Can't Save Files as JPEG or PNG in Photoshop? Fix It Here
- 8 Top Fixes: Drive Letter Changed by Itself & C Drive Becoming D
- 9 Bitcoin Exchange-Traded Funds (ETFs) Have reportedly Absorbed Close to a Staggering $1 Billion in Fresh Capital
- 10 Exploring the Potential of New Meme Coins: Bubb (BUBB), BTC Bull Token (BTCBULL), and MIND of Pepe (MIND)
- 11 Cardano (ADA) Price To $10 Is In Play
- 12 Shiba Inu (SHIB) Gains Immense Attention from Whales and Long-Term Holders Amidst the Ongoing Bearish Market Sentiment
- 13 Despite the Bear Market, Shiba Inu (SHIB) Is Gaining Attention from Whales and Long-Term Holders
- 14 How to turn your laptop into a desktop computer
- 15 PancakeSwap (CAKE) Price Prediction: Can It Continue Its Outperformance?
Latest Tutorials
-
- Go language practical GraphQL
- 3006 2024-04-19
-
- 550W fan master learns JavaScript from scratch step by step
- 4344 2024-04-18
-
- Getting Started with MySQL (Teacher mosh)
- 2347 2024-04-07
-
- Mock.js | Axios.js | Json | Ajax--Ten days of quality class
- 3083 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
