On Wednesday 07 January 2009 15:21, Jeff Foster wrote: > I'm not understanding re-find. > > (re-find #"bar" "bar") => "bar" > > whereas > > (re-find #"(foo)|(bar)" "foo bar") => ["foo" "foo" nil] > > Why does one return a vector and one just the result directly?
The use of capturing parentheses in the latter. > ... is there any reason it doesn't always return a vector? Randall Schulz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---