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: 2953375 |
Download: 164 |
Latest Downloads
Fantasy Aquarium
Girls Frontline
Wings of Stars
Little Flower Fairy Fairy Paradise
Restaurant Cute Story
Shanhe Travel Exploration
Love and Producer
The most powerful brain 3
Odd Dust: Damila
Young Journey to the West 2
24 HoursReading Leaderboard
- 1Array Searching in DSA using JavaScript: From Basics to Advanced
- 2Best JavaScript Frameworks for Frontend Developer
- 3Mock Requests
- 4Non-nestjs events
- 5Unleashing MongoDB: Why Cursor-Based Pagination Outperforms Offset-Based Pagination Every Time!
- 6Exploring JavaScript’s Intl Object
- 7Enhance Your Web Development Skills with These Rare HTML Attributes
- 8IFA 2024 | Dell Inspiron 14 5441 now available for US$899 with new Snapdragon X Plus X1P-42-100 SoC option
- 9Floki (FLOKI) vs. Mpeppe (MPEPE): The Battle of the Meme Coins
- 10Kaspa (KAS) Price Surge Ahead? Analysis Predicts Potential Rally, But There's a Catch
- 11Lazy Loading in ReactJS: A Developer Guide
- 12Polygon Executes Major Technical Upgrade, Transitions MATIC to New POL Token
- 13Mpeppe (MPEPE) Emerges as a Strong Contender, Challenging Floki Inu's (FLOKI) Dominance in the Memecoin Market
- 14Elon Musk: The Meme Coin Market Maker
- 15Mpeppe (MPEPE) Presale Soars, Attracting Solana (SOL) Holders as the Market Continues to Evolve
Latest Tutorials
-
- Go language practical GraphQL
- 1409 2024-04-19
-
- 550W fan master learns JavaScript from scratch step by step
- 2817 2024-04-18
-
- Getting Started with MySQL (Teacher mosh)
- 1329 2024-04-07
-
- Mock.js | Axios.js | Json | Ajax--Ten days of quality class
- 2166 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