All Projects → regexhq → es6-template-regex

regexhq / es6-template-regex

Licence: MIT license
Regular expression for matching es6 template delimiters in a string.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to es6-template-regex

learn-regex
Learn regex the easy way
Stars: ✭ 43,660 (+290966.67%)
Mutual labels:  regex, regular-expression
regXwild
⏱ Superfast ^Advanced wildcards++? | Unique algorithms that was implemented on native unmanaged C++ but easily accessible in .NET via Conari (with caching of 0x29 opcodes +optimizations) etc.
Stars: ✭ 20 (+33.33%)
Mutual labels:  regex, match
Regaxor
A regular expression fuzzer.
Stars: ✭ 35 (+133.33%)
Mutual labels:  regex, regular-expression
Regex
🔤 Swifty regular expressions
Stars: ✭ 311 (+1973.33%)
Mutual labels:  regex, regular-expression
regex
Regular expressions for Prolog
Stars: ✭ 16 (+6.67%)
Mutual labels:  regex, regular-expression
moar
Deterministic Regular Expressions with Backreferences
Stars: ✭ 19 (+26.67%)
Mutual labels:  regex, regular-expression
regex-not
Create a javascript regular expression for matching everything except for the given string.
Stars: ✭ 31 (+106.67%)
Mutual labels:  regex, regular-expression
berkeley-parser-analyser
A tool for classifying mistakes in the output of parsers
Stars: ✭ 34 (+126.67%)
Mutual labels:  syntax, parse
RegexReplacer
A flexible tool to make complex replacements with regular expression
Stars: ✭ 38 (+153.33%)
Mutual labels:  regex, regular-expression
doi-regex
Regular expression for matching DOIs
Stars: ✭ 28 (+86.67%)
Mutual labels:  regex, regular-expression
regexp-expand
Show the ELisp regular expression at point in rx form.
Stars: ✭ 18 (+20%)
Mutual labels:  regex, regular-expression
termco
Regular Expression Counts of Terms and Substrings
Stars: ✭ 24 (+60%)
Mutual labels:  regex, regular-expression
FileRenamerDiff
A File Renamer App featuring a difference display before and after the change.
Stars: ✭ 32 (+113.33%)
Mutual labels:  regex, regular-expression
parse-author
Parse a person, author, contributor or maintainer string into an object with name, email and url properties following NPM conventions. Useful for the `authors` property in package.json or for parsing an AUTHORS file into an array of person objects.
Stars: ✭ 23 (+53.33%)
Mutual labels:  parse, regex
regex-comuns
Um estudo de regex comuns
Stars: ✭ 15 (+0%)
Mutual labels:  regex, regular-expression
compiler-design-lab
These are my programs for compiler design lab work in my sixth semester
Stars: ✭ 47 (+213.33%)
Mutual labels:  regex, regular-expression
Postcss Less
PostCSS Syntax for parsing LESS
Stars: ✭ 93 (+520%)
Mutual labels:  syntax, parse
parse-github-url
Parse a Github URL into an object. Supports a wide variety of GitHub URL formats.
Stars: ✭ 114 (+660%)
Mutual labels:  parse, regex
pcre-heavy
A Haskell regular expressions library that doesn't suck | now on https://codeberg.org/valpackett/pcre-heavy
Stars: ✭ 52 (+246.67%)
Mutual labels:  regex, regular-expression
cregex
A small implementation of regular expression matching engine in C
Stars: ✭ 72 (+380%)
Mutual labels:  regex, regular-expression

es6-template-regex NPM version NPM monthly downloads NPM total downloads Linux Build Status

Regular expression for matching es6 template delimiters in a string.

Install

Install with npm:

$ npm install --save es6-template-regex

Usage

The main export of this module is a function that must be called:

var regex = require('es6-template-regex');
console.log(regex());

Example

function interpolate(str, data) {
  return str.replace(re(), function(m, prop) {
    return data[prop] || prop;
  });
}

var str = 'foo ${bar} baz ${quux}';
var data = {bar: 'AAA', quux: 'BBB'};
interpolate(str, data);
//=> 'foo AAA baz BBB'

About

Related projects

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Contributors

Commits Contributor
7 jonschlinkert
1 adjohnson916

Building docs

(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)

To generate the readme, run the following command:

$ npm install -g verbose/verb#dev verb-generate-readme && verb

Running tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm install && npm test

Author

Jon Schlinkert

License

Copyright © 2017, Jon Schlinkert. Released under the MIT License.


This file was generated by verb-generate-readme, v0.6.0, on May 07, 2017.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].