Find HTTP:// and create link
View Single Post
12-13-2008, 12:17 AM
Join Date: Apr 2007
creates a regular expression object with the pattern
(case insensitive) and
The pattern itself searches for (and retains for later) the characters "
" followed by one or more (
) single characters (
; 'single character' means any character except a newline). The question mark (
) makes the 'one or more single characters' what is called
(which is important but we can gloss over it right now). Next,
matches either a whitespace character (tab, space, newline), a vertical pipe character or a newline character (I think Wildhoney really meant just
so that the match stops at whitespace (thanks to the ungreedy repetition earlier)).
Put simply, we match all instances of "http://" followed by one or more characters, followed by a whitespace character.
View Public Profile
Send a private message to Salathe
Visit Salathe's homepage!
Find More Posts by Salathe