'John Merlino' via Ruby on Rails: Talk wrote in post #1155178:
*? -- 0 or more, lazy. Matches will be as small as possible.
/\s.*\s/.match(searchText) (not lazy)
/\s.*?\s/.match(searchText) (lazy)
/\s.*\s/ (not lazy)
The-> moon is made of <-cheese (1 match)
/\s.*?\s/ (lazy)
=> The-> moon <-is-> made <-of cheese (2 matches)
--
Posted via
http://www.ruby-forum.com/.