Giter Site home page Giter Site logo

ruby_regex's Introduction

RubyRegex

Gem Version Build Status Code Climate

RubyRegex is a nice collection of regular expressions in Ruby

Regular expressions

RubyRegex::Url
RubyRegex::Domain
RubyRegex::Email
RubyRegex::Username
RubyRegex::USSocialSecurity
RubyRegex::GeneralPostalCode
RubyRegex::ZIPCode
RubyRegex::CreditCard
RubyRegex::MasterCard
RubyRegex::Visa
RubyRegex::TwitterUsername
RubyRegex::DeliciousUsername
RubyRegex::SlideshareUsername
RubyRegex::GithubUsername
RubyRegex::UUID
RubyRegex::DBDate
RubyRegex::DBDatetime
RubyRegex::SpanishBankAccountNumber
RubyRegex::Dni

Rails

Add to your Gemfile

gem 'ruby_regex'

In the models

validates_format_of :email, :with => RubyRegex::Email

Contribute

Of course, contributions will be apreciated.

If you want to contribute send me a pull request with new regular expressions (and their tests) or send me an email with your desired regular expression to [email protected]


RubyRegex is released under the MIT-License and is Copyright (c)2010 Emili Parreño.

ruby_regex's People

Contributors

baweaver avatar carlesjove avatar eparreno avatar fguillen avatar guillermo avatar jaimeiniesta avatar juliend2 avatar klappy avatar moomerman avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.