Thursday, May 13, 2010

Regular Expressions Searching

Issue: a "Regular Expression" is a way of building complex searches but they are also confusing to use.  Below are some search expressions that I have found useful.  And links to some tutorials.

Quick/Visual/Learning:

/btarget/b  - will find the whole word target in a text string (works with start/end line, spaces, special char
 examples -- target @target -target-

(^| +)target( +$) - will find target at start/end of line or with spaces before/after. Will not match special characters.
example --    target

Here is a tutorial on regular expression searches

No comments: