regexmatch.dev
Explore
Open main menu
Save & Share
Facebook
Twitter
Tumblr
E-Mail
Pinterest
LinkedIn
Reddit
Everthing in an element
Published on Tue Mar 01 2022
Regex
Test String
<td class="col-2"> 5 doors, 6 Speed manual, <span class="pc"> from £24,270 </span> <span class="ccd"> from £24,215 </span> <a href="/fleet/company-tax?modelId=1353&trimId=1365&derivativeId=1366" class="tax-calculator ccd vw-btn btn-no-border"><span class="vw-icon-link-small">Get a company car tax quote</span></a> <br> 5 doors, 7 Speed auto DSG, <span class="pc"> from £25,685 </span> <span class="ccd"> from £25,630 </span> <a href="/fleet/company-tax?modelId=1353&trimId=1365&derivativeId=1374" class="tax-calculator ccd vw-btn btn-no-border"><span class="vw-icon-link-small">Get a company car tax quote</span></a> <br> </td>
Additional matching regexes for
Everthing in an element
Regex
Match an element from a list
BEM
CSS Coding Guideline **BEM** (Block Element Modifier)
Match text in square brackets
Drupal7 Media Element in node body - A regex to match the media module square bracketted token/element for embedde images in node body. Use case - using the body text trimmed in a meta description - need to remove the media element as well as strip tags.
Match Ice Faces Empty RTF
Will match any empty or containing whitespace only Ice Faces Rich Text Input element.
Element's Attribute Value in XML (simple)
Simple regular expression for extracting attribute value of the element in XML-string. Attribute value should be in quotes.
Replace caracters not inside HTM tags
Select a character (or string) ingnoring if that element is inside the HTML tags. Useful to apply html tags using replace.
Gitlab GraphQl query finder
Searches for the first list element in a graphql query, which allows for filtering and pagination, except for the group node
Div shortcode [div]..[/div]
Converts the markdown shortcode for the dive element to the regular HTML: Example shortcode: [div id="bla" class="ups"]some multiple line text[/div]
Browser Console - Format Specifier
Captures format specifiers commonly used in logging and console messages, as defined in [the current whatwg/console spec](https://console.spec.whatwg.org/#formatter): - `%s`: Formats the value as a string - `%i`: Formats the value as an integer - `%d`: Formats the value as an integer - `%f`: Formats the value as a floating point value - `%o`: Formats the value as an expandable DOM element. As seen in the Elements panel - `%O`: Formats the value as an expandable JavaScript object - `%c`: Applies CSS style rules to the output string as specified by the second parameter
Browser Console - Format Specifier
Captures format specifiers commonly used in logging and console messages, as defined in [the current whatwg/console spec](https://console.spec.whatwg.org/#formatter): - `%s`: Formats the value as a string - `%i`: Formats the value as an integer - `%d`: Formats the value as an integer - `%f`: Formats the value as a floating point value - `%o`: Formats the value as an expandable DOM element. As seen in the Elements panel - `%O`: Formats the value as an expandable JavaScript object - `%c`: Applies CSS style rules to the output string as specified by the second parameter