regular expression

now browsing by tag


Composable Regular Expressions and Fields

Martin Fowler wrote a brief article about composing regular expressions in order to make it easier to deal with individual “tokens” and to give them structure. As noted by a reddit commenter, string constants can be a bit unwieldly to deal with and will break. Scheme Shell solves this problem with anRead More

Emacs Tip: Word counting with a regular expression

Here’s a function for Emacs that counts the number of words in a buffer by using a regular expression: [gist 5942572] The regular expression matches against one or more word characters. It doesn’t move the current point of the buffer so you don’t have to keep re-positioning the cursor every time youRead More