Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
This gem provides support for the REGEXP function in ActiveRecord when using the SQLite3 adapter.
Ruby
tag: v1.1.0

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
.travis.yml
Gemfile
LICENSE
README.md
Rakefile
changelog.md
sqlite3_ar_regexp.gemspec

README.md

SQLite3 ActiveRecord REGEXP

This adds REGEXP support to SQLite3 in ActiveRecord.

Installation

Add this line to your application's Gemfile:

gem 'sqlite3_ar_regexp'

And then execute:

$ bundle

Or install it yourself as:

$ gem install sqlite3_ar_regexp

Usage

# find all accounts where the first name starts with "a"
Account.where('first_name REGEXP "^a"')

Credits

The original code for this was done by Joe Yates and can be found at http://titusd.co.uk/2010/01/31/regular-expressions-in-sqlite/.

Something went wrong with that request. Please try again.