Project

jsregexp

0.0
No release in over 3 years
Low commit activity in last 3 years
JSRegexp is a converter from Ruby Regexp to valid JavaScript RegExp format
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

 Project Readme

JSRegexp

Gem Version Build Status

JSRegexp is a converter from Ruby Regexp to a valid JavaScript RegExp format

Installation

Add this line to your application's Gemfile:

gem 'jsregexp'

And then execute:

$ bundle

Or install it yourself as:

$ gem install jsregexp

Usage

JSRegexp.convert(/\Afoo/)   # => '^foo'
JSRegexp.convert('/\Gbar/') # => '^bar'
JSRegexp.convert('baz\Z')   # => 'baz$'

License

BSD-3-Clause