This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Given we have a regex with one more matching groups. | |
* The regex should capture those groups from an 'input' | |
* string and replace the matched values in an 'template' | |
* string. | |
* | |
* Example: | |
* regex: /([1-9]{8})/([1-9]{8})?/ | |
* input string: '/some-magic/path/12122211/22112211' | |
* template string: 'http://someurl?adId=$1&adId=$2' |
OlderNewer