775ac7b58c
you must login with an BTP account in order to see the app
8 lines
289 B
JavaScript
8 lines
289 B
JavaScript
'use strict';
|
|
|
|
exports.buildRegExp = function (pattern) {
|
|
// does not include '*' since it has special semantics in our custom patterns
|
|
pattern = pattern.replace(/[.+?^${}()|[\]\\]/g, '\\$&');
|
|
pattern = pattern.replace(/\*/g, '.*');
|
|
return new RegExp('^' + pattern + '$', 'i');
|
|
};
|