Category Archives: Apple

Regular Expression Cheatsheet

Here’s a quick cheatsheet of the metacharacters used in regular expressions.

.dotany one character
[ ... ]character classany character listed
[^...]negated character classany character not listed
^caretthe position at the start of the line
$dollarthe position at the end of the line
\<backslash less-thanthe position at the start of the word
\>backslash greater-thanthe position at the end of the word
|or, barmatches either expression it separates
( ... )parenthesesused to limit scope of |
?question markone allowed; none required ("one optional")
*asteriskunlimited allowed; none required ("any amount OK")
+plusunlimited allowed; one required ("at least one")
\1, \2, ...back referencematches text previously matched within first, second, etc., set of parentheses
\backslashescape a metacharacter to match literally
{ ... }bracesInterval; counting quantifier; specify number of matches

OSX Tip: Create an Alias to a directory on a Screen Shared network computer

To create an alias to a specific folder on the server:

  1. Create an Alias of any local directory by highlighting the directory and typing CMD-L
  2. Move this to any convenient location such as the Desktop
  3. Get Info of this new Alias by typing CMD-I
  4. Click “Select New Original”
  5. Navigate to the folder on the shared computer and select it
  6. Click OPEN
  7. Close the Info window and you’re done.

This Alias can then be dragged to the Finder Toolbar for a quick-launch to the folder.