Displaying 1 to 18 from 18 results

ansi-regex - Regular expression for matching ANSI escape codes

  •    Javascript

Some of the codes we run as a test are codes that we acquired finding various lists of non-standard or manufacturer specific codes. We test for both standard and non-standard codes, as most of them follow the same or similar format and can be safely matched in strings without the risk of removing actual string content. There are a few non-standard control codes that do not follow the traditional format (i.e. they end in numbers) thus forcing us to exclude them from the test because we cannot reliably match them.On the historical side, those ECMA standards were established in the early 90's whereas the VT100, for example, was designed in the mid/late 70's. At that point in time, control codes were still pretty ungoverned and engineers used them for a multitude of things, namely to activate hardware ports that may have been proprietary. Somewhere else you see a similar 'anarchy' of codes is in the x86 architecture for processors; there are a ton of "interrupts" that can mean different things on certain brands of processors, most of which have been phased out.

email-regex - Regular expression for matching email addresses

  •    Javascript

Use it for finding email addresses or checking if something is email like.You shouldn't use this for validating emails. Only for hinting to the user.

execall - Find multiple RegExp matches in a string

  •    Javascript

Instead of having to iterate over RegExp#exec, immutable, and with a nicer result format.Returns an array of objects with a match, sub-matches, and index.





comment-regex - Regular expression for matching JavaScript comments

  •    Javascript

This is pretty fragile and created for perf reasons where using a real parser would be overkill.The contents of the comment is in the first submatch.

is-dotfile - Return true if the file is (or the file path has) a dotfile.

  •    Javascript

Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory. To be considered a dotfile, it must be the last filename in the path, like .gitignore. Otherwise it's a dot directory, like .git/ and .github/.

frep - A find and replace utility

  •    Javascript

Find and replace utility for node.js. Transform strings by running multiple RegExp or string find-and-replace patterns on a string in sequence, reducing the final string to the accumulated result of each transformation. Patterns can be strings (or arrays of strings) or regular expressions. Replacements can be strings or functions.

doi-regex - Regular expression for matching DOIs

  •    HTML

Returns a regex for matching a DOI. Returns a regex for matching a DOI that has been declared with a doi: string in front.

whitespace-regex - Regular expression for matching the whitespace in a string.

  •    Javascript

Regular expression for matching the whitespace in a string. Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

word-regex - Regular expression for matching words in a string

  •    Javascript

Regular expression for matching words in a string. Support for english, CJK and Cyrillic. Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.