is it possible to use a regular expression with the DataMapper ".like" conditional syntax?
for example, i would like to find only those users whose hobby starts with the string "skating".
the regex would look something like this:
^skating
currently, i am only able to find all users whose hobby includes the words "skating", thus returning more records than i want.
>> User.all(:hobby.like => "%skating%") # what i get +--------------+---------------+------------------+---------------------+ | login | first_name | last_name | hobby | +--------------+---------------+------------------+---------------------+ | jefferson | Tom | Jefferson | skating | | adams | John | Adams | skating | | washington | George | Washington | speedskating | +--------------+---------------+------------------+---------------------+ # what i want to get +--------------+---------------+------------------+---------------------+ | login | first_name | last_name | hobby | +--------------+---------------+------------------+---------------------+ | jefferson | Tom | Jefferson | skating | | adams | John | Adams | skating | +--------------+---------------+------------------+---------------------+ >> User.all(:hobby.like => "%^skating%") # yields no results
thanks for any feedback!