UNPKG

@mikezimm/fps-core-v7

Version:

Library of reusable core interfaces, types and constants migrated from fps-library-v2

23 lines 1.35 kB
// Migrated from: npmFunctions/src\Services\Regex\constants.ts //Regular expression for anything like #4 (github issue reference) export const RegexHashNumber = /\#(\d+)/g; //https://stackoverflow.com/a/43622095 //RegexXMLOpenProp looks for a Quote, then space, then Capital Letter - like a prop in an xml element //Originally used in ../Stings/Formatting > getArrayOfXMLElements export const RegexXMLOpenProp = /[\"] [A-Z]/g; //Used in /..Elements/markdown // Moved this to src\logic\Strings\splitHash.ts where it is used // export type INullOrStringArray = null | string[]; /** * Common Regex examples */ // Replace most common special characters export const RegexSpecial = /[.,;:?|=~!&^{}$%+_[\]-]+/g; export const RegexMathOps = /[+*\/=-]+/g; // Replace basic math opts [ ] export const RegexSquarBkt = /[[\]]+/g; // Replace brackets [ ] export const RegexCurleys = /[{}]+/g; // Replace parentheses { } export const RegexParenth = /[()]+/g; // Replace parentheses ( ) export const RegexSlashes = /[/\\]+/g; // Replace slashes / \ export const RegexQuotes = /[']+/g; // Replace quotes export const RegexSpaces = /\s\s+/g; // Replace multiple spaces with just one export const RegexWords = /\b([a-z]+)\b/gi; // Used to split a string by word boundaries only using a-z any case //# sourceMappingURL=constants.js.map