id
stringlengths
16
145
text
stringlengths
1
179k
title
stringclasses
1 value
Mmdn_RegExp/Mmdn_RegExp_18_7.txt
r newer "x".replace(/x(.)?/g, (m, group) => { console.log(`group: ${group}`); }); // group: undefined Note that due to web compatibility, ` RegExp.$N ` will still return an empty string instead of ` undefined ` ( [ bug 1053944 ](https://bugzil.la/1053944) ). ## See also * [ Polyfill of many...
Mmdn_RegExp/Regularexpressions_114_0.txt
[ Groups and backreferences ](/en- US/docs/Web/JavaScript/Guide/Regular_expressions/Groups_and_backreferences)
Mmdn_RegExp/toString_121_0.txt
Deprecated
Mmdn_RegExp/Mmdn_RegExp_27_0.txt
* Skip to main content * Skip to search * Skip to select language [ MDN Web Docs ](/en-US/) Open main menu * References [ References ](/en-US/docs/Web) * [ Overview / Web Technology Web technology reference for developers ](/en-US/docs/Web) * [ HTML Structure of content on the web ](/en-US/do...
Mmdn_RegExp/Regularexpressions_53_0.txt
* [ Documentation
Mmdn_RegExp/Mmdn_RegExp_28_1.txt
tIndex ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) 9. [ ` RegExp.lastMatch ($&) ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastMatch) Deprecated 10. [ ` RegExp.lastParen ($+) ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastParen) Deprecated ...
Mmdn_RegExp/Regularexpressions_46_0.txt
](/en-US/plus)
Mmdn_RegExp/toString_78_0.txt
toString()
Mmdn_RegExp/Mmdn_RegExp_8_2.txt
al_Objects/Object/constructor) 2. [ ` Object.prototype.__proto__ ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto) Deprecated 13. Methods 1. [ ` Object.prototype.__defineGetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__) Deprecated 2. [ ` Obj...
Mmdn_RegExp/Regularexpressions_175_0.txt
## Examples
Mmdn_RegExp/Regularexpressions_160_0.txt
const re = /\w+\s/g;
Mmdn_RegExp/exec_2_0.txt
* References [ References ](/en-US/docs/Web) * [ Overview / Web Technology
Mmdn_RegExp/toString_62_0.txt
* [ Log in ](/users/fxa/login/authenticate/?next=%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FRegExp%2FtoString) * [ Sign up for free ](/users/fxa/login/authenticate/?next=%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FReference%2FGlobal_Objects%2FRegExp%2FtoString)
Mmdn_RegExp/Regularexpressions_138_0.txt
If you want to construct the regular expression from a string, yet another alternative is this script:
Mmdn_RegExp/toString_34_0.txt
](/en-US/docs/Learn/HTML)
Mmdn_RegExp/Regularexpressions_203_0.txt
Was this page helpful to you?
Mmdn_RegExp/Mmdn_RegExp_27_1.txt
/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) 9. [ ` RegExp.lastMatch ($&) ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastMatch) Deprecated 10. _[ ` RegExp.lastParen ($+) ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastParen) Deprecated _ 11. ...
Mmdn_RegExp/Mmdn_RegExp_9_2.txt
pt/Reference/Global_Objects/Object/constructor) 2. [ ` Object.prototype.__proto__ ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto) Deprecated 13. Methods 1. [ ` Object.prototype.__defineGetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__) Deprecate...
Mmdn_RegExp/Regularexpressions_2_0.txt
* References [ References ](/en-US/docs/Web) * [ Overview / Web Technology
Mmdn_RegExp/toString_63_0.txt
1. [ References ](/en-US/docs/Web) 2. [ JavaScript ](/en-US/docs/Web/JavaScript) 3. [ Reference ](/en-US/docs/Web/JavaScript/Reference) 4. [ Standard built-in objects ](/en-US/docs/Web/JavaScript/Reference/Global_Objects) 5. [ RegExp ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp) 6. [ RegExp.prototy...
Mmdn_RegExp/Regularexpressions_15_0.txt
Protocol for transmitting web resources
Mmdn_RegExp/Mmdn_RegExp_16_0.txt
* Skip to main content * Skip to search * Skip to select language [ MDN Web Docs ](/en-US/) Open main menu * References [ References ](/en-US/docs/Web) * [ Overview / Web Technology Web technology reference for developers ](/en-US/docs/Web) * [ HTML Structure of content on the web ](/en-US/do...
Mmdn_RegExp/Mmdn_RegExp_14_3.txt
` subclasses. ## Examples ### Direct call This method can be used in almost the same way as [ ` String.prototype.search() ` ](/en- US/docs/Web/JavaScript/Reference/Global_Objects/String/search) , except for the different value of ` this ` and the different arguments order. js const re = /-/g; ...
Mmdn_RegExp/Mmdn_RegExp_26_2.txt
Script/Reference/Global_Objects/Object/constructor) 2. [ ` Object.prototype.__proto__ ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto) Deprecated 13. Methods 1. [ ` Object.prototype.__defineGetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__) Depre...
Mmdn_RegExp/Regularexpressions_141_0.txt
Results of regular expression execution. Object | Property or index | Description | In this example ---|---|---|--- ` myArray ` | | The matched string and all remembered substrings. | ` ['dbbd', 'bb', index: 1, input: 'cdbbdbsbz'] ` ` index ` | The 0-based index of the match in the input string. | ` 1 ` ` ...
Mmdn_RegExp/Mmdn_RegExp_13_1.txt
/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) 9. [ ` RegExp.lastMatch ($&) ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastMatch) Deprecated 10. [ ` RegExp.lastParen ($+) ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastParen) Deprecated 11. [ ` RegEx...
Mmdn_RegExp/exec_33_0.txt
Learn to structure web content with HTML
Mmdn_RegExp/toString_80_0.txt
None.
Mmdn_RegExp/exec_112_0.txt
**Warning:** There are many pitfalls that can lead to this becoming an infinite loop!
Mmdn_RegExp/Regularexpressions_154_0.txt
const re = new RegExp("pattern", "flags");
Mmdn_RegExp/Regularexpressions_206_0.txt
This page was last modified on Jan 2, 2024 by [ MDN contributors ](/en- US/docs/Web/JavaScript/Guide/Regular_expressions/contributors.txt) .
Mmdn_RegExp/Regularexpressions_29_0.txt
* [ MDN Learning Area
Mmdn_RegExp/Mmdn_RegExp_26_3.txt
appended to the result array. Then, the capturing groups' values are appended one-by-one. * If the current match is an empty string, or if the regexp doesn't match at the current position (since it's sticky), the ` lastIndex ` would still be advanced — if the regex is [ Unicode-aware ](/en-US/docs/Web/JavaScript/...
Mmdn_RegExp/exec_109_0.txt
const myRe = /ab*/g; const str = "abbcdefabh"; let myArray; while ((myArray = myRe.exec(str)) !== null) { let msg = `Found ${myArray[0]}. `; msg += `Next match starts at ${myRe.lastIndex}`; console.log(msg); }
Mmdn_RegExp/Mmdn_RegExp_2_3.txt
cky) ](/en- US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) Matches only from the index indicated by the ` lastIndex ` property of this regular expression in the target string. Does not attempt to match from any later indexes. ### Return value ` RegExp(pattern) ` returns ` pattern ` directly if...
Mmdn_RegExp/exec_69_0.txt
* Try it * Syntax * Description * Examples * Specifications * Browser compatibility * See also
Mmdn_RegExp/toString_83_0.txt
## Description
Mmdn_RegExp/exec_76_0.txt
## Try it
Mmdn_RegExp/Regularexpressions_37_0.txt
](/en-US/docs/Learn/CSS)
Mmdn_RegExp/Mmdn_RegExp_19_4.txt
Portions of this content are ©1998– 2024 by individual mozilla.org contributors. Content available under [ a Creative Commons license ](/en- US/docs/MDN/Writing_guidelines/Attrib_copyright_license) . *[ Deprecated ]: Deprecated. Not for use i...
Mmdn_RegExp/exec_123_0.txt
## See also
Mmdn_RegExp/exec_129_0.txt
This page was last modified on Sep 25, 2023 by [ MDN contributors ](/en- US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec/contributors.txt) .
Mmdn_RegExp/Mmdn_RegExp_17_2.txt
e/Global_Objects/Object/constructor) 2. [ ` Object.prototype.__proto__ ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto) Deprecated 13. Methods 1. [ ` Object.prototype.__defineGetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__) Deprecated 2. [...
Mmdn_RegExp/exec_97_0.txt
` exec() ` is the primitive method of regexps. Many other regexp methods call ` exec() ` internally — including those called by string methods, like [ ` @@replace ` ](/en- US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@replace) . While ` exec() ` itself is powerful (and is the most efficient), it often does...
Mmdn_RegExp/Regularexpressions_200_0.txt
An online visual regex tester.
Mmdn_RegExp/javascriptregexpexer_19_0.txt
Easy Medium Hard
Mmdn_RegExp/Mmdn_RegExp_19_0.txt
* Skip to main content * Skip to search * Skip to select language [ MDN Web Docs ](/en-US/) Open main menu * References [ References ](/en-US/docs/Web) * [ Overview / Web Technology Web technology reference for developers ](/en-US/docs/Web) * [ HTML Structure of content on the web ](/en-US/do...
Mmdn_RegExp/Regularexpressions_26_0.txt
* Guides [ Guides ](/en-US/docs/Learn) * [ Overview / MDN Learning Area
Mmdn_RegExp/Mmdn_RegExp_0_3.txt
t/Reference/Operators/Assignment) 5. [ async function expression ](/en-US/docs/Web/JavaScript/Reference/Operators/async_function) 6. [ async function* expression ](/en-US/docs/Web/JavaScript/Reference/Operators/async_function*) 7. [ await ](/en-US/docs/Web/JavaScript/Reference/Operators/await) 8. [ Bitw...
Mmdn_RegExp/Mmdn_RegExp_7_2.txt
or) 2. [ ` Object.prototype.__proto__ ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto) Deprecated 13. Methods 1. [ ` Object.prototype.__defineGetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__) Deprecated 2. [ ` Object.prototype.__defineSette...
Mmdn_RegExp/Regularexpressions_38_0.txt
* [ JavaScript
Mmdn_RegExp/toString_109_0.txt
* [ MDN on Mastodon ](https://mozilla.social/@mdn) * [ MDN on X (formerly Twitter) ](https://twitter.com/mozdevnet) * [ MDN on GitHub ](https://github.com/mdn/) * [ MDN Blog RSS Feed ](/en-US/blog/rss.xml)
Mmdn_RegExp/Regularexpressions_22_0.txt
](/en-US/docs/Mozilla/Add-ons/WebExtensions)
Mmdn_RegExp/Regularexpressions_83_0.txt
Regular expressions are patterns used to match character combinations in strings. In JavaScript, regular expressions are also objects. These patterns are used with the [ ` exec() ` ](/en- US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/exec) and [ ` test() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/...
Mmdn_RegExp/javascriptregexpexer_21_0.txt
Follow us on [ Facebook ](https://www.facebook.com/W3resource-103553425799800) and [ Twitter ](https://twitter.com/w3resource) for latest update.
Mmdn_RegExp/Regularexpressions_50_0.txt
* [ Updates
Mmdn_RegExp/Mmdn_RegExp_29_1.txt
[ ` RegExp: lastIndex ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastIndex) 9. [ ` RegExp.lastMatch ($&) ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastMatch) Deprecated 10. [ ` RegExp.lastParen ($+) ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastPar...
Mmdn_RegExp/toString_3_0.txt
Web technology reference for developers
Mmdn_RegExp/Mmdn_RegExp_18_6.txt
### Using a regular expression with the sticky flag The [ ` sticky ` ](/en- US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/sticky) flag indicates that the regular expression performs sticky matching in the target string by attempting to match starting at [ ` RegExp.prototype.lastIndex ` ](/en- US/docs/Web...
Mmdn_RegExp/toString_99_0.txt
## See also
Mmdn_RegExp/toString_56_0.txt
* [ FAQ
Mmdn_RegExp/Regularexpressions_221_0.txt
Visit [ Mozilla Corporation’s ](https://www.mozilla.org) not-for-profit parent, the [ Mozilla Foundation ](https://foundation.mozilla.org/) . Portions of this content are ©1998– 2024 by individual mozilla.org contributors. Content available under [ a Creative Commons license ](/en- US/docs/MDN/Writing_guideli...
Mmdn_RegExp/Regularexpressions_110_0.txt
[ Character classes ](/en- US/docs/Web/JavaScript/Guide/Regular_expressions/Character_classes)
Mmdn_RegExp/Mmdn_RegExp_2_4.txt
ul to you? Yes No [ Learn how to contribute ](https://github.com/mdn/content/blob/main/CONTRIBUTING.md "This will take you to our contribution guidelines on GitHub.") . This page was last modified on Sep 7, 2023 by [ MDN contributors ](/en- US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/RegExp/contributo...
Mmdn_RegExp/Regularexpressions_121_0.txt
To match a literal backslash, you need to escape the backslash. For instance, to match the string "C:\" where "C" can be any letter, you'd use ` /[A-Z]:\\/ ` — the first backslash escapes the one after it, so the expression searches for a single literal backslash.
Mmdn_RegExp/Regularexpressions_33_0.txt
Learn to structure web content with HTML
Mmdn_RegExp/Regularexpressions_145_0.txt
However, if you have this script:
Mmdn_RegExp/Mmdn_RegExp_21_4.txt
st modified on Jun 22, 2023 by [ MDN contributors ](/en- US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/@@match/contributors.txt) . [ View this page on GitHub ](https://github.com/mdn/content/blob/main/files/en- us/web/javascript/reference/global_objects/regexp/@@match/index.md?plain=1 "Folder: en-us/web/ja...
Mmdn_RegExp/javascriptregexpexer_10_0.txt
Output:
Mmdn_RegExp/exec_29_0.txt
* [ MDN Learning Area
Mmdn_RegExp/exec_20_0.txt
* [ Web Extensions
Mmdn_RegExp/Mmdn_RegExp_24_2.txt
ects/Object/constructor) 2. [ ` Object.prototype.__proto__ ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/proto) Deprecated 13. Methods 1. [ ` Object.prototype.__defineGetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__defineGetter__) Deprecated 2. [ ` Object.pr...
Mmdn_RegExp/Regularexpressions_137_0.txt
(See Using the global search flag with ` exec() ` for further info about the different behaviors.)
Mmdn_RegExp/Regularexpressions_62_0.txt
* [ Log in ](/users/fxa/login/authenticate/?next=%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FGuide%2FRegular_expressions) * [ Sign up for free ](/users/fxa/login/authenticate/?next=%2Fen-US%2Fdocs%2FWeb%2FJavaScript%2FGuide%2FRegular_expressions)
Mmdn_RegExp/toString_5_0.txt
* [ HTML
Mmdn_RegExp/toString_93_0.txt
new RegExp().toString(); // "/(?:)/"
Mmdn_RegExp/exec_125_0.txt
## Help improve MDN
Mmdn_RegExp/Regularexpressions_162_0.txt
const re = new RegExp("\\w+\\s", "g");
Mmdn_RegExp/Mmdn_RegExp_7_1.txt
eb/JavaScript/Reference/Global_Objects/RegExp/lastIndex) 9. [ ` RegExp.lastMatch ($&) ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastMatch) Deprecated 10. [ ` RegExp.lastParen ($+) ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/lastParen) Deprecated 11. [ ` RegExp.leftC...
Mmdn_RegExp/Mmdn_RegExp_14_4.txt
o ](/) Your blueprint for a better internet. * [ MDN on Mastodon ](https://mozilla.social/@mdn) * [ MDN on X (formerly Twitter) ](https://twitter.com/mozdevnet) * [ MDN on GitHub ](https://github.com/mdn/) * [ MDN Blog RSS Feed ](/en-US/blog/rss.xml) ## MDN * [ About ](/en-US/about) * [ Blog ](/en...
Mmdn_RegExp/exec_106_0.txt
### Finding successive matches
Mmdn_RegExp/toString_111_0.txt
* [ About ](/en-US/about) * [ Blog ](/en-US/blog/) * [ Careers ](https://www.mozilla.org/en-US/careers/listings/?team=ProdOps) * [ Advertise with us ](/en-US/advertising)
Mmdn_RegExp/exec_48_0.txt
Get real-time assistance and support
stackoverflow-a6522f38b724
# Leveraging Snowflake External Stages to Load CSV Data from Amazon S3 Snowflake offers a powerful and flexible set of tools for ingesting data from cloud storage platforms, including Amazon S3. One of the most efficient workflows involves using Snowflake’s external stage feature in combination with the `COPY INTO` co...
stackoverflow-6e44e9e08b3a
**The Science Behind Snowflake Formation: Temperature, Humidity, and Crystal Symmetry** Snowflakes have long captivated scientists and laypeople alike with their delicate shapes and intricate symmetry. Far from being random, each snowflake’s form is the result of precise physical processes within the atmosphere. Und...
stackoverflow-4bb132be4f76
**Technical Report on Advanced Cryogenic Techniques for Artificial Snow Production in Ski Resorts** --- **Abstract** This report examines state-of-the-art cryogenic methods employed in contemporary ski resorts to produce artificial snow with superior consistency and durability. Emphasis is placed on the physics o...
stackoverflow-d22e2ea6c80c
**Eco-Friendly Strategies for Melting Snow and Ice on Outdoor Surfaces** Winter brings with it picturesque landscapes and cozy indoor moments, but for those responsible for maintaining outdoor walkways, driveways, and steps, it also presents the ongoing challenge of snow and ice accumulation. Slippery surfaces can l...
stackoverflow-4c21d2a79421
# Reshaping Data with Pandas: Mastering the `melt` Function In the realm of data analysis, the way information is structured can greatly influence the ease and effectiveness of exploration. While many datasets arrive in a “wide” format—where each variable occupies its own column—there are numerous situations where a “...
stackoverflow-b914f1b4be15
# Reshaping Data with Pandas `melt`: From Wide to Long Format When working with tabular datasets, especially those stored in CSV files, it is common to encounter “wide” formats—where each variable is spread across multiple columns. While this can be convenient for certain storage or viewing purposes, many analytical a...
stackoverflow-bfd5bc61f238
# Reshaping Data with Pandas `melt`: A Step-by-Step Guide When working with tabular data, it’s common to encounter datasets stored in a “wide” format—where each variable has its own column. While this layout can be convenient for certain analyses, many operations, visualizations, and statistical models work best wit...
stackoverflow-8e53d62d3c10
**Report: Techniques for Melting Snow and Ice on Road Surfaces** --- **Abstract** Snow and ice accumulation on roadways presents significant hazards to transportation systems, leading to increased accident rates, reduced mobility, and economic losses. This report examines the principal methods used to physically ...
stackoverflow-05fecb258edb
# Visually Melting and Reshaping Data Tables in a Java-Based ETL Tool When preparing datasets for analytics pipelines, a common need is to transform *wide* tables—where each variable is stored in its own column—into *long* tables, where variables are captured as key–value pairs. This “melting” process makes it easier ...
stackoverflow-57955c6f1b3c
**Managing the Cold Chain: Secure Storage and Controlled Melting of Ice Samples for Environmental Research** In environmental research, ice samples are more than frozen water—they are time capsules containing critical information about atmospheric composition, particulate matter, and chemical traces from the past. T...
stackoverflow-ea40cc296a01
# Reshaping Data with the MELT Command in Apache Spark’s DataFrame API In large-scale data processing, one recurring challenge is transforming datasets between different structural formats to suit analytical needs. While pivoting operations are widely recognized for converting long-format data into a wide format, the ...
stackoverflow-605dfc6f2b00
**Melting Chocolate Chips: Microwave vs. Double Boiler Methods** When it comes to working with chocolate chips in baking or confectionery projects, achieving a silky, lump-free melt is essential for taste, texture, and presentation. While the chips are designed to hold their shape when baked in cookies, they can be ...
stackoverflow-2538e11e75d9
# Strengthening Data Transfers in Snowflake: A Deep Dive into Network Security Measures In today’s cloud-driven data landscape, enterprises rely on secure and efficient mechanisms to protect sensitive information during transit. Snowflake, as a leading data platform, implements a robust set of network security measure...
stackoverflow-243a74f4a652
**Report on Techniques for Melting Snow and Ice on Roadways** --- **Abstract** This report examines contemporary methods employed by municipalities to melt snow and ice from roadway surfaces, focusing on chemical de-icing agents and heated pavement systems. The discussion integrates an overview of the physics of ...
stackoverflow-cdf6fe768542
# Optimizing Data Storage and Retrieval in Snowflake with Clustering Keys and Micro-Partitioning Efficient data storage and retrieval is critical when working with large-scale datasets in Snowflake. While Snowflake’s architecture already delivers high performance by separating compute from storage, applying thoughtful...
stackoverflow-6deb59b020f8
# Optimizing Text Pattern Matching in Advanced SQL Queries for Inventory Databases When working with inventory databases that store large amounts of textual data—such as product descriptions, supplier notes, or concatenated category codes—developers often encounter performance bottlenecks when applying advanced SQL qu...
stackoverflow-cafbc96f6d73
# Optimizing SQL Server Lookup Performance with Large Text-Based Fields When working with SQL Server, lookup operations are a common requirement—especially in data models that rely on joining or filtering datasets using text-based fields. However, performance can degrade significantly when these fields are large, co...