{"_id":"becke-ch--regex--s0-0-v1--base--pl--lib","_rev":"9-e283ee2e2799391d124f6869c34582d5","name":"becke-ch--regex--s0-0-v1--base--pl--lib","description":"A JavaScript Regular Expression library, extending the standard RegExp class with missing functionality","dist-tags":{"latest":"1.4.0"},"versions":{"1.0.11":{"name":"becke-ch--regex--s0-0-v1--base--pl--lib","version":"1.0.11","description":"Extension of JavaScript RegExp adding missing functionality","keywords":["Regular Expression","RegExp","Regex","exec"],"main":"./src/becke-ch--regex--s0-0-v1--base--pl--lib.js","repository":{"url":"file:///ws/tool/becke-ch--regex--s0-v1","type":"git"},"author":{"name":"Raoul Becke","email":"regex--s0-v1@becke.ch","url":"http://becke.ch/tool/becke-ch--regex--s0-v1/"},"license":"SEE LICENSE IN LICENSE","publishConfig":{"registry":"http://localhost:8081/repository/becke-ch--repo-nexus--s1-0-1-v3-0--npm-hosted/"},"files":["./src"],"devDependencies":{"mocha":"^3.2.0"},"licenseText":"Copyright 2017 becke.ch - All Rights Reserved\nThis file is part of becke-ch--regex--s0-v1\n\nbecke.ch (MIT-style) License for the becke-ch--regex--s0-v1 Software\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"becke-ch--regex--s0-0-v1--base--pl--lib@1.0.11","dist":{"shasum":"c0a9284f221e5c790e13f76da9916f8cd81c9917","tarball":"https://registry.npmjs.org/becke-ch--regex--s0-0-v1--base--pl--lib/-/becke-ch--regex--s0-0-v1--base--pl--lib-1.0.11.tgz","integrity":"sha512-7enPPBZlsUSrfG0Mkai74erfjuP8Zeda8122ITpbQ0EVmMN2BkZPniVX8o4Ue+wO4b257tZ5p59AHLn6+XmJyg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZkIFyLzxw1UAyo6C0PGGCAWI3V6iY9LgWSLpGjmMcvgIgZkt5Op+cfMtzwG9RRp3m2SzEWjMp5l5S6cql9UEtMoY="}]},"maintainers":[{"name":"becke.ch","email":"npm--s0-v1@becke.ch"}],"_npmUser":{"name":"becke.ch","email":"npm--s0-v1@becke.ch"},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/becke-ch--regex--s0-0-v1--base--pl--lib-1.0.11.tgz_1491507269206_0.6601008812431246"},"directories":{}},"1.0.30":{"name":"becke-ch--regex--s0-0-v1--base--pl--lib","version":"1.0.30","description":"A JavaScript Regular Expression library, extending the standard RegExp class with missing functionality","keywords":["Regular Expression","RegExp","Regex","exec"],"main":"./src/becke-ch--regex--s0-0-v1--base--pl--lib.js","repository":{"url":"file:///ws/tool/becke-ch--regex--s0-v1","type":"git"},"author":{"name":"Raoul Becke","email":"regex--s0-v1@becke.ch","url":"http://www--s0-v1.becke.ch/tool/becke-ch--regex--s0-v1/becke-ch--regex--s0-0-v1--homepage--pl--client/"},"license":"SEE LICENSE IN LICENSE","files":["src/**/*.js"],"scripts":{"build":"jsdoc src -d doc -R README.md -t template/default"},"devDependencies":{"jsdoc":"latest","mocha":"^3.2.0"},"_id":"becke-ch--regex--s0-0-v1--base--pl--lib@1.0.30","_shasum":"e44843a311d7d12fba9d59a06de5829283a62467","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.1","_npmUser":{"name":"becke.ch","email":"npm--s0-v1@becke.ch"},"dist":{"shasum":"e44843a311d7d12fba9d59a06de5829283a62467","tarball":"https://registry.npmjs.org/becke-ch--regex--s0-0-v1--base--pl--lib/-/becke-ch--regex--s0-0-v1--base--pl--lib-1.0.30.tgz","integrity":"sha512-sDw4riWJ4Afu1YfE2rW3s+pudavN18ayA/EiFbU8R9wRknJ4neQk+Ja0QIRa9Y8BH+Oux2edovwb6DAEDsz3sQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBL0BooplOJao2Nr9UydqSPqaddO8FXompyVM6WTeXDpAiBtTOPu5DdWY1uP0V3XiOXE/uatlg/lFUvIHaAZu2xJFQ=="}]},"maintainers":[{"name":"becke.ch","email":"npm--s0-v1@becke.ch"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/becke-ch--regex--s0-0-v1--base--pl--lib-1.0.30.tgz_1492623505304_0.7179226346779615"},"directories":{}},"1.1.0":{"name":"becke-ch--regex--s0-0-v1--base--pl--lib","version":"1.1.0","description":"A JavaScript Regular Expression library, extending the standard RegExp class with missing functionality","keywords":["Regular Expression","RegExp","Regex","exec"],"main":"./src/becke-ch--regex--s0-0-v1--base--pl--lib.js","repository":{"url":"file:///ws/tool/becke-ch--regex--s0-v1","type":"git"},"author":{"name":"Raoul Becke","email":"regex--s0-v1@becke.ch","url":"http://www--s0-v1.becke.ch/tool/becke-ch--regex--s0-v1/becke-ch--regex--s0-0-v1--homepage--pl--client/"},"license":"SEE LICENSE IN LICENSE","files":["src/**/*.js"],"scripts":{"build":"jsdoc src -d doc -R README.md -t template/default"},"devDependencies":{"jsdoc":"latest","mocha":"^3.2.0"},"_id":"becke-ch--regex--s0-0-v1--base--pl--lib@1.1.0","_shasum":"0f1656e16de2da63afd45f8e3ce755534827fb7f","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.1","_npmUser":{"name":"becke.ch","email":"npm--s0-v1@becke.ch"},"dist":{"shasum":"0f1656e16de2da63afd45f8e3ce755534827fb7f","tarball":"https://registry.npmjs.org/becke-ch--regex--s0-0-v1--base--pl--lib/-/becke-ch--regex--s0-0-v1--base--pl--lib-1.1.0.tgz","integrity":"sha512-+sTUzSGD65GiHolnWA3hsRmiBprfiwtYkwHVsiia2xUu8blpQ4KAl+DGsi6H11k9lfjopdmvTmTgE/iUY41ovQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHnxW0vzPogyxdy4ivNC42J5GTaILLlCmtdPQk4w6FrHAiAKOXKH8GRVfbh7b8UR5euWFIwRtk4T95EzdG5uXn/vhg=="}]},"maintainers":[{"name":"becke.ch","email":"npm--s0-v1@becke.ch"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/becke-ch--regex--s0-0-v1--base--pl--lib-1.1.0.tgz_1492623604579_0.02240135776810348"},"directories":{}},"1.1.1":{"name":"becke-ch--regex--s0-0-v1--base--pl--lib","version":"1.1.1","description":"A JavaScript Regular Expression library, extending the standard RegExp class with missing functionality","keywords":["Regular Expression","RegExp","Regex","Search","Search & Replace","Search and Replace","match","split","exec"],"main":"./src/becke-ch--regex--s0-0-v1--base--pl--lib.js","repository":{"url":"file:///ws/tool/becke-ch--regex--s0-v1","type":"git"},"author":{"name":"Raoul Becke","email":"regex--s0-v1@becke.ch","url":"http://www--s0-v1.becke.ch/tool/becke-ch--regex--s0-v1/becke-ch--regex--s0-0-v1--homepage--pl--client/"},"license":"SEE LICENSE IN LICENSE","files":["src/**/*.js"],"scripts":{"build":"jsdoc src -d doc -R README.md -t template/default"},"devDependencies":{"jsdoc":"latest","mocha":"^3.2.0"},"_id":"becke-ch--regex--s0-0-v1--base--pl--lib@1.1.1","_shasum":"2923c91166d5a381b57b28fa9ad2e6f308950913","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.1","_npmUser":{"name":"becke.ch","email":"npm--s0-v1@becke.ch"},"dist":{"shasum":"2923c91166d5a381b57b28fa9ad2e6f308950913","tarball":"https://registry.npmjs.org/becke-ch--regex--s0-0-v1--base--pl--lib/-/becke-ch--regex--s0-0-v1--base--pl--lib-1.1.1.tgz","integrity":"sha512-Gr5GeiEwbv6Cj46UjHcUITQamgL5J+XXZZIUBwLLb69thAjwi99dJ9oCiZvbbXiHlcmZeHRpsMZE8BcLnkaTLg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiqhhH3yNk+NP2F9x8KXYVm/frArsiho+XiWIadw8s2wIgDXT83aiChUCVjvBEdvk9XKVGo60hcDroMe6XMjpBT6E="}]},"maintainers":[{"name":"becke.ch","email":"npm--s0-v1@becke.ch"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/becke-ch--regex--s0-0-v1--base--pl--lib-1.1.1.tgz_1493450495496_0.3942430140450597"},"directories":{}},"1.2.0":{"name":"becke-ch--regex--s0-0-v1--base--pl--lib","version":"1.2.0","description":"A JavaScript Regular Expression library, extending the standard RegExp class with missing functionality","keywords":["Regular Expression","RegExp","Regex","Search","Search & Replace","Search and Replace","match","split","exec"],"main":"./src/becke-ch--regex--s0-0-v1--base--pl--lib.js","repository":{"url":"file:///ws/tool/becke-ch--regex--s0-v1","type":"git"},"author":{"name":"Raoul Becke","email":"regex--s0-v1@becke.ch","url":"http://www--s0-v1.becke.ch/tool/becke-ch--regex--s0-v1/becke-ch--regex--s0-0-v1--homepage--pl--client/"},"license":"SEE LICENSE IN LICENSE","files":["src/**/*.js"],"scripts":{"build":"jsdoc src -d doc -R README.md -t template/default"},"devDependencies":{"jsdoc":"latest","mocha":"^3.2.0"},"_id":"becke-ch--regex--s0-0-v1--base--pl--lib@1.2.0","_shasum":"2e73e9d21f2c2e6f5a5454045636f0ab93e46130","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.1","_npmUser":{"name":"becke.ch","email":"npm--s0-v1@becke.ch"},"dist":{"shasum":"2e73e9d21f2c2e6f5a5454045636f0ab93e46130","tarball":"https://registry.npmjs.org/becke-ch--regex--s0-0-v1--base--pl--lib/-/becke-ch--regex--s0-0-v1--base--pl--lib-1.2.0.tgz","integrity":"sha512-FCZ7NyLOQGcrz4jCURY3KGEXnk1YbwXREF9b22RFCf1DUBO0OQ31LM7RpzNz2kEC8D7mM/6rH/HyAj31i7TbsQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHZnPQEX3TDVHAOrLm3/Izvz9H3jYUtHrOUyBtTaLaTGAiEAgJ4JDLQdZDj3vwb6OOcToYvS/LGqrx8vASsFE5+ohxo="}]},"maintainers":[{"name":"becke.ch","email":"npm--s0-v1@becke.ch"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/becke-ch--regex--s0-0-v1--base--pl--lib-1.2.0.tgz_1493591523248_0.791526792338118"},"directories":{}},"1.3.0":{"name":"becke-ch--regex--s0-0-v1--base--pl--lib","version":"1.3.0","description":"A JavaScript Regular Expression library, extending the standard RegExp class with missing functionality","keywords":["Regular Expression","RegExp","Regex","Search","Search & Replace","Search and Replace","match","split","exec"],"main":"./src/becke-ch--regex--s0-0-v1--base--pl--lib.js","repository":{"url":"file:///ws/tool/becke-ch--regex--s0-v1","type":"git"},"author":{"name":"Raoul Becke","email":"regex--s0-v1@becke.ch","url":"http://www--s0-v1.becke.ch/tool/becke-ch--regex--s0-v1/becke-ch--regex--s0-0-v1--homepage--pl--client/"},"license":"SEE LICENSE IN LICENSE","files":["src/**/*.js"],"scripts":{"build":"jsdoc src -d doc -R README.md -t template/default","test":"node_modules/mocha/bin/mocha test/becke-ch--regex--s0-0-v1--base--pl--lib--test.js"},"devDependencies":{"jsdoc":"latest","mocha":"^3.2.0"},"_id":"becke-ch--regex--s0-0-v1--base--pl--lib@1.3.0","_shasum":"6848524465bddd22cbec80878dd1967778abc49f","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.1","_npmUser":{"name":"becke.ch","email":"npm--s0-v1@becke.ch"},"dist":{"shasum":"6848524465bddd22cbec80878dd1967778abc49f","tarball":"https://registry.npmjs.org/becke-ch--regex--s0-0-v1--base--pl--lib/-/becke-ch--regex--s0-0-v1--base--pl--lib-1.3.0.tgz","fileCount":5,"unpackedSize":46886,"integrity":"sha512-G+aHl6eboQvDkKgslJAm2DnDVObIXYfqBLME6WBg1f/sY0RcsOwXS0D0i9tI89JgsSBlcqqfLJZ2UNEiCzCnLw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDxwWV6T2d+kSPtnbELY3fsO3svesgacN+cRHsykrxsLAiAGwucBMPaPs6mZRtm7ej+wpAWc/wmoCzh+xGexwoSBSA=="}]},"maintainers":[{"name":"becke.ch","email":"npm--s0-v1@becke.ch"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/becke-ch--regex--s0-0-v1--base--pl--lib_1.3.0_1523120082503_0.7570041579013451"},"_hasShrinkwrap":false},"1.4.0":{"name":"becke-ch--regex--s0-0-v1--base--pl--lib","version":"1.4.0","description":"A JavaScript Regular Expression library, extending the standard RegExp class with missing functionality","keywords":["Regular Expression","RegExp","Regex","Search","Search & Replace","Search and Replace","match","split","exec"],"main":"./src/becke-ch--regex--s0-0-v1--base--pl--lib.js","repository":{"url":"file:///ws/tool/becke-ch--regex--s0-v1","type":"git"},"author":{"name":"Raoul Becke","email":"regex--s0-v1@becke.ch","url":"http://www--s0-v1.becke.ch/tool/becke-ch--regex--s0-v1/becke-ch--regex--s0-0-v1--homepage--pl--client/"},"license":"SEE LICENSE IN LICENSE","files":["src/**/*.js"],"scripts":{"build":"jsdoc src -d doc -R README.md -t template/default","test":"node_modules/mocha/bin/mocha test/becke-ch--regex--s0-0-v1--base--pl--lib--test.js"},"devDependencies":{"jsdoc":"latest","mocha":"^3.2.0"},"_id":"becke-ch--regex--s0-0-v1--base--pl--lib@1.4.0","_shasum":"429ceebbfa5f7e936e78d73fbdc7da7162b20e20","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.10.1","_npmUser":{"name":"becke.ch","email":"npm--s0-v1@becke.ch"},"dist":{"shasum":"429ceebbfa5f7e936e78d73fbdc7da7162b20e20","tarball":"https://registry.npmjs.org/becke-ch--regex--s0-0-v1--base--pl--lib/-/becke-ch--regex--s0-0-v1--base--pl--lib-1.4.0.tgz","fileCount":5,"unpackedSize":47341,"integrity":"sha512-FnWonOyaw7Vivg5nIkrUll9HSS5TjFbyuURAiDssuL6VxrBe3ERzudRxOcWRhZYlP89UArMDikz7SapRPQpmZQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBnu317wl0WiKr8GjqEJKlE1CHP5Vgvs1VYhLz5pPGAQIgOTC+Gq8jcfvoP+ncPO5HLljojsaLEu0hesYg7RamGeE="}]},"maintainers":[{"name":"becke.ch","email":"npm--s0-v1@becke.ch"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/becke-ch--regex--s0-0-v1--base--pl--lib_1.4.0_1523132308276_0.2088319574569255"},"_hasShrinkwrap":false}},"readme":"## Synopsis\n\n**<a href=\"http://www--s0-v1.becke.ch/tool/becke-ch--regex--s0-v1/becke-ch--regex--s0-0-v1--homepage--pl--client/\">becke.ch js regular expression library</a>**: \nA JavaScript Regular Expression library, extending the standard \n<a href=\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\">RegExp</a> \nclass with missing functionality.<br>\nA good description on JavaScript Regular Expression can be found \n<a href=\"https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions\">here (developer.mozilla.org)</a> \nand <a href=\"https://www.w3schools.com/jsref/jsref_obj_regexp.asp\">here (www.w3schools.com)</a>.<br>\n\n<b><a href=\"http://www--s0-v1.becke.ch/tool/becke-ch--regex--s0-v1/becke-ch--regex--s0-0-v1--homepage--pl--client/doc/Regex.html\">API Reference</a></b>\n\n## Code Example\n\nConvert plain text to html: Replace special characters (multiple spaces, tabs, ...) in plain text with their html \"equivalent\":\n\n        //Convert plain text to html: Replace special characters (multiple spaces, tabs, ...) in plain text with their html \"equivalent\":\n        var CONVERT_TEXT_SPECIAL_CHARACTER_TO_HTML_ESCAPE_CHARACTER_PATTERN = \"( {2})|(\\t)|(&)|(<)|(>)|(\\n)\";\n        var CONVERT_TEXT_SPECIAL_CHARACTER_TO_HTML_ESCAPE_CHARACTER_PATTERN_REPLACE_STRING = [undefined, \"&amp;nbsp;&amp;nbsp;\", \"&amp;emsp;\", \"&amp;amp;\", \"&amp;lt;\", \"&amp;gt;\", \"&lt;br&gt;\"];\n        \n        var str = \"3 spaces:'   ' followed by a tab:'\\t' followed by an ampersand:'&' followed by less-than sign:'<' followed by greater-than sign:'>' followed by newline:'\\n' and that's it\";\n        \n        var regex = new Regex(CONVERT_TEXT_SPECIAL_CHARACTER_TO_HTML_ESCAPE_CHARACTER_PATTERN, 'g');\n        var result = regex[Symbol.replace](str, CONVERT_TEXT_SPECIAL_CHARACTER_TO_HTML_ESCAPE_CHARACTER_PATTERN_REPLACE_STRING);\n        //Alternative Syntax: For browsers supporting \"Symbol\": Chrome & Firefox\n        var resultAlternative = str.replace(regex,CONVERT_TEXT_SPECIAL_CHARACTER_TO_HTML_ESCAPE_CHARACTER_PATTERN_REPLACE_STRING);\n        console.log(result === \"3 spaces:'&amp;nbsp;&amp;nbsp; ' followed by a tab:'&amp;emsp;' followed by an ampersand:'&amp;amp;' followed by less-than sign:'&amp;lt;' followed by greater-than sign:'&amp;gt;' followed by newline:'&lt;br&gt;' and that's it\");\n\n\nRetrieve content and position of: opening-, closing tags and body content for: non-nested html-tags.\n\n        //Retrieve content and position of: opening-, closing tags and body content for: non-nested html-tags.\n        var pattern = '(<([^ >]+)[^>]*>)([^<]*)(<\\\\/\\\\2>)';\n        var str = '<html><code class=\"html plain\">first</code><div class=\"content\">second</div></html>';\n        var regex = new Regex(pattern, 'g');\n        var result = regex.exec(str);\n\n        console.log(5 === result.length);\n        console.log('<code class=\"html plain\">first</code>'=== result[0]);\n        console.log('<code class=\"html plain\">'=== result[1]);\n        console.log('first'=== result[3]);\n        console.log('</code>'=== result[4]);\n        console.log(5=== result.index.length);\n        console.log(6=== result.index[0]);\n        console.log(6=== result.index[1]);\n        console.log(31=== result.index[3]);\n        console.log(36=== result.index[4]);\n\n        result = regex.exec(str);\n        console.log(5=== result.length);\n        console.log('<div class=\"content\">second</div>'=== result[0]);\n        console.log('<div class=\"content\">'=== result[1]);\n        console.log('second'=== result[3]);\n        console.log('</div>'=== result[4]);\n        console.log(5=== result.index.length);\n        console.log(43=== result.index[0]);\n        console.log(43=== result.index[1]);\n        console.log(64=== result.index[3]);\n        console.log(70=== result.index[4]);\n\n\n## Motivation\n\n**Regular Expression Group Based Search & Replace**: Main motivation was to find a solution for a regular expression \ngroup based search and replace. Instead of just providing a single replacement string for the entire match we can \nprovide an array of replacement strings for each matching group. This method (string.replace(new Regex(pattern, 'g'),[undefined, replaceStringGroup1, ...])) \nsmoothly extends the standard JavaScript replace functionality (string.replace(new RegExp(pattern, 'g'),replaceStringGroup0).\n\nIn addition to solve this problem the standard exec function of RegExp need to be extended to provide indexes for each\nmatching group which automatically provided a fix respective solution to the following problem: \n\"<a href=\"http://stackoverflow.com/questions/1985594/how-to-find-indices-of-groups-in-javascript-regular-expressions-match\">How to find indices of groups in JavaScript regular expressions match?</a>\".<br>\n\n## Installation\n\n**HTML**: <a href=\"http://www--s0-v1.becke.ch/tool/becke-ch--regex--s0-v1/becke-ch--regex--s0-0-v1--homepage--pl--client/node_modules/becke-ch--regex--s0-0-v1--base--pl--lib/src/becke-ch--regex--s0-0-v1--base--pl--lib.js\" target=\"_blank\">becke.ch js regular expression library download</a><br><br>\n\n\t<html lang=\"en\">\n        <head>\n            <script language=\"JavaScript\" src=\"../src/becke-ch--regex--s0-0-v1--base--pl--lib.js\" type=\"text/javascript\"></script>\n            ...\n            <script language=\"JavaScript\">\n                <!--\n        \n                var pattern = '(<([^ >]+)[^>]*>)([^<]*)(<\\\\/\\\\2>)';\n                var regex = new Regex(pattern, 'g');\n                ...\n        \n                //-->\n            </script>\n        </head>\n        <body>\n            ...\n        </body>\n\t</html>\n\n\n**Node.js & NPM**: <a href=\"https://www.npmjs.com/package/becke-ch--regex--s0-0-v1--base--pl--lib\" target=\"_blank\">becke.ch js npm regular expression library download</a><br><br>\npackage.json\n\n  \"dependencies\": {\n    \"becke-ch--regex--s0-0-v1--base--pl--lib\": \"latest\"\n  }\n\njavascript:\n\n    var Regex = require('becke-ch--regex--s0-0-v1--base--pl--lib');\n\n    var pattern = '(<([^ >]+)[^>]*>)([^<]*)(<\\\\/\\\\2>)';\n    var regex = new Regex(pattern, 'g');\n    ...\n\n**Angular 2 & Typescript**: <a href=\"https://www.npmjs.com/package/becke-ch--regex--s0-0-v1--base--pl--lib\" target=\"_blank\">becke.ch js npm regular expression library download</a><br><br>\npackage.json\n\n  \"dependencies\": {\n    \"becke-ch--regex--s0-0-v1--base--pl--lib\": \"latest\"\n  }\n\nCreate typings file: src/app/custom.typings.d.ts:\n\n    declare module 'Regex'\n\nImport typings file into: src/main.ts:\n\n    ///<reference path=\"./app/custom.typings.d.ts\"/>\n    \n    import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';\n    \n    import { AppModule } from './app/app.module';\n    \n    platformBrowserDynamic().bootstrapModule(AppModule);\n\nMap Declaration in: src/systemjs.config.js:\n\n    (function (global) {\n      System.config({\n        paths: {\n        ...\n        },\n        // map tells the System loader where to look for things\n        map: {\n          // private libraries\n          'Regex': 'npm:becke-ch--regex--s0-0-v1--base--pl--lib/src/becke-ch--regex--s0-0-v1--base--pl--lib.js'\n        },\n        // packages tells the System loader how to load when no filename and/or no extension\n        packages: {\n        ...\n        }\n      });\n    })(this);\n\n\ntypescript: src/app/app.component.ts: Important is to set the array-of-replacement-strings to type \"any\" otherwise the \ntypescript will not compile because originally replace only supports one replacement string for the entire match and\nnot as we have it in this enhanced version an array of replacement strings for each matching group:\n\n    import * as Regex from 'Regex';\n\n    export class AppComponent {\n        replaceClicked() {\n            var str: string;\n            var pattern: string;\n            var flags: string;\n            var replacementStringArray: any;\n            \n            //str.replace(new Regex(pattern, flags), replacementStringArray);\n            (new Regex(pattern, flags))[Symbol.replace](str, replacementStringArray);\n        }\n    }\n\n\n\n## API Reference\n\n<a href=\"http://www--s0-v1.becke.ch/tool/becke-ch--regex--s0-v1/becke-ch--regex--s0-0-v1--homepage--pl--client/doc/Regex.html\">The JSDoc can be found here</a>.\n\n## Tests\n\n<a href=\"http://www--s0-v1.becke.ch/tool/becke-ch--regex--s0-v1/becke-ch--regex--s0-0-v1--homepage--pl--client/\">**You can test it live here!**</a>\n\nOR\n\nOnce you've done the installation you can run (hundreds of) Unit (Mocha) tests with:\n\n    npm test\n\nOR alternatively\n\nYou can run these tests as follows:\n\n    cd test\n    ../node_modules/mocha/bin/mocha becke-ch--regex--s0-0-v1--base--pl--lib--test.js\n\n## Changelog (Version History)\n\nThe changelog information can be found <a href=\"http://www--s0-v1.becke.ch/tool/becke-ch--regex--s0-v1/CHANGELOG.md\">here</a>.\n\n## License\n\n<a href=\"http://www--s0-v1.becke.ch/tool/becke-ch--regex--s0-v1/becke-ch--regex--s0-v1--license.txt\">The (MIT style) License can be found here</a>\n","maintainers":[{"name":"becke.ch","email":"npm--s0-v1@becke.ch"}],"time":{"modified":"2022-06-13T04:28:20.948Z","created":"2017-04-06T19:34:29.995Z","1.0.11":"2017-04-06T19:34:29.995Z","1.0.30":"2017-04-19T17:38:26.193Z","1.1.0":"2017-04-19T17:40:05.611Z","1.1.1":"2017-04-29T07:21:37.448Z","1.2.0":"2017-04-30T22:32:05.390Z","1.3.0":"2018-04-07T16:54:42.648Z","1.4.0":"2018-04-07T20:18:28.365Z"},"keywords":["Regular Expression","RegExp","Regex","Search","Search & Replace","Search and Replace","match","split","exec"],"repository":{"url":"file:///ws/tool/becke-ch--regex--s0-v1","type":"git"},"author":{"name":"Raoul Becke","email":"regex--s0-v1@becke.ch","url":"http://www--s0-v1.becke.ch/tool/becke-ch--regex--s0-v1/becke-ch--regex--s0-0-v1--homepage--pl--client/"},"license":"SEE LICENSE IN LICENSE","readmeFilename":"README.md"}