Tags » Regex

Scott vs. Regex

I built a blog several years ago to record my lessons-learned in programming, so although I built this blog to record my findings on computer security, I’m still in the business of programming, and am still finding a lot to say. 363 more words

Python

grep: searching for pipes, optional characters

For my own reference as RegEx is a write-only language:

Search for pipes means just back-slash escaping them:

grep "\|S\|" products.txt > s-rated-products.txt

Search for optional charactes (in this case searching for both the singular and plural form of a word) can be done by…

65 more words
Development

re.search | operand in CoPP automation

Ran into a little snag when trying to automatically update some CoPP policies last night;

PROBLEM

Here is some regex that we had searching for the ‘#’ symbol at the Cisco prompt: 216 more words

Copp

correcting autocorrect!

Wow… how time flies!  Over three years ago I wrote an article called AutoCorrect… for everything! which explained how to use AutoHotkey so you had a similar functionality to Microsoft Word for autocorrect, except it worked in all your windows applications.   835 more words

CAT Tools

One - liner to batch rename files with regex-remove part of the filename

Don’t read this post. It’s only for me so that I don’t forget it ;-)

After a long fight with bash, find, sed, … Here is the one – liner: 121 more words

Coding

R and regex: find all occurrences

In R there are many functions that work with a pattern written as a regular expression. Today I needed to deal with one of these functions: … 167 more words

Programming

Coffee and Code: Username Validation with Regex

Having just written — and sadly lost — the copy of this entry, the second draft will be a bit shorter.

This morning’s coding exercise entailed validating a username using regular expressions (regex).   279 more words

Coding Challenge