Re: Building regex pattern literals (Noob question)

2008-12-03 Thread Blaine
I'm all straightened out. Thanks everyone. Very helpful. On Dec 3, 3:18 pm, Chouser <[EMAIL PROTECTED]> wrote: > On Wed, Dec 3, 2008 at 2:57 PM, Blaine <[EMAIL PROTECTED]> wrote: > > > I want to build a regular expression pattern literal (I think that's > > what they're called) like #"a.*" out

Re: Building regex pattern literals (Noob question)

2008-12-03 Thread Chouser
On Wed, Dec 3, 2008 at 2:57 PM, Blaine <[EMAIL PROTECTED]> wrote: > > I want to build a regular expression pattern literal (I think that's > what they're called) like #"a.*" out of separate strings like "a" and > ".*". > > user> (re-seq #"a.*" "bab") ; this is cool > ("ab") > user> (re-seq #(str

Re: Building regex pattern literals (Noob question)

2008-12-03 Thread J. McConnell
On Wed, Dec 3, 2008 at 3:10 PM, Randall R Schulz <[EMAIL PROTECTED]> wrote: > > You're using a reader notation unrelated to regular expressions. > Instead, #(...) is a shorthand notation for an anonymous function > definition. You can read more about the other reader macros here: http://clojure.

Re: Building regex pattern literals (Noob question)

2008-12-03 Thread Randall R Schulz
On Wednesday 03 December 2008 11:57, Blaine wrote: > I want to build a regular expression pattern literal (I think that's > what they're called) like #"a.*" out of separate strings like "a" and > ".*". > > user> (re-seq #"a.*" "bab") ; this is cool > ("ab") > user> (re-seq #(str "a" ".*") "bab")