function getControlCharacters(regexStr){// check control characters, if RegExp object used
var controlChars=regexStr.match(controlChar)||[];var stringControlChars=[];// check substr, if regex literal used
var subStrIndex=regexStr.search(stringControlChar);if(subStrIndex>-1){// is it escaped, check backslash count
var possibleEscapeCharacters=regexStr.slice(0,subStrIndex).match(consecutiveSlashesAtEnd);var hasControlChars=possibleEscapeCharacters===null||!(possibleEscapeCharacters[0].length%2);if(hasControlChars){stringControlChars=regexStr.slice(subStrIndex,-1).split(consecutiveSlashes).filter(Boolean).map(function(x){var match=x.match(stringControlCharWithoutSlash)||[x];return"\\"+match[0];});}}return controlChars.map(function(x){var hexCode=("0"+x.charCodeAt(0).toString(16)).slice(-2);return"\\x"+hexCode;}).concat(stringControlChars);}
Return a list of the control characters in the given regex string
@param {string} regexStr regex as string to check
@returns {array} returns a list of found control characters on given string
@private