reg

regexworld

with an array ```js const RegexWorld = require("./test.js");

Showing:

Popularity

Downloads/wk

22

Maintenance

No Maintenance Data Available

Package

Dependencies

0

Size (min+gzip)

0.5KB

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Deprecated!
Not maintained anymore

Readme

with an array

const RegexWorld = require("./test.js");

RegexWorld
  .setStr("this is a this test $$ahah$$ you know it a $$lol$$")
  .setRegex([
    RegexWorld.parse("this", "g"),
    /\$\$(.*?)\$\$/gi
  ])
  .regexStart(null, (err, result) => {
    if(err) console.log(err);
    console.log(result);
  })

result:

[ [ [ 'this', index: 0 ], [ 'this', index: 10 ] ],
  [ [ '$$ahah$$', 'ahah', index: 20 ],
    [ '$$lol$$', 'lol', index: 43 ] ] ]

with an obj

const RegexWorld = require("./test.js");

RegexWorld
  .setStr("this is a this test $$ahah$$ you know it a $$lol$$")
  .setRegex({
    "this": RegexWorld.parse("this", "g"),
    "$$": /\$\$(.*?)\$\$/gi
  })
  .regexStart(null, (err, result) => {
    if(err) console.log(err);
    console.log(result);
  })

result:

{ this: [ [ 'this', index: 0 ], [ 'this', index: 10 ] ],
  '$$':
   [ [ '$$ahah$$', 'ahah', index: 20 ],
     [ '$$lol$$', 'lol', index: 43 ] ] }

with a simple regex

const RegexWorld = require("./test.js");

RegexWorld
  .setStr("this is a this test $$ahah$$ you know it a $$lol$$")
  .setRegex(/\$\$(.*?)\$\$/gi)
  .regexStart(null, (err, result) => {
    if(err) console.log(err);
    console.log(result);
  })

result:

[ [ '$$ahah$$', 'ahah', index: 20 ],
  [ '$$lol$$', 'lol', index: 43 ] ]

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial