Coder Social home page Coder Social logo

is's Introduction

is

Actions Status codecov Go Report Card Go Reference license

Introduction

Package is provides a curated collection of common regular expressions for Go. It aims to simplify the process of validating common patterns, such as IP addresses, URLs, email addresses, and more, using easy-to-use regular expressions.

package main

import (
  "github.com/madflojo/is"
)

func main() {
  // Validate an IPv4 address
  if is.IPv4().MatchString("10.0.0.1") {
    // do stuff
  }

  // Validate a web URL
  if is.URL().MatchString("https://example.com") {
    // do stuff
  }

  // Validate an email address
  if is.Email().MatchString("[email protected]") {
    // do stuff
  }
}

Regular expressions can be complex and challenging to create for every edge case. The goal of this project is to provide a collection that covers most common cases, while acknowledging that not all possible edge cases are addressed. Contributions and improvements to the regular expressions are always welcome to enhance the package's reliability and usefulness.

Contributing

If you would like to contribute, please fork the repo and send in a pull request. All contributions are welcome and appreciated.

License

The Apache 2 License. Please see LICENSE for more information.

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.