@playbooks/utils
Version:
A collection of utilities used for Playbooks.
15 lines (14 loc) • 441 B
JavaScript
const nonAlphaNumericRegex = /[^a-zA-Z0-9- ]/g;
const alphaNumericRegex = /^([a-zA-Z]|[0-9]|-)+$/g;
const httpRegex = /(?:https?):\/\/(\w+:?\w*)/g;
const nonAlphaNumericRegexString = "[^a-zA-Z0-9- ]";
const alphaNumericRegexString = "^([a-zA-Z]|[0-9]|-)+$";
const httpRegexString = "^https?://";
export {
alphaNumericRegex,
alphaNumericRegexString,
httpRegex,
httpRegexString,
nonAlphaNumericRegex,
nonAlphaNumericRegexString
};