GithubHelp home page GithubHelp logo

averroes / perlverbalexpressions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from verbalexpressions/perlverbalexpressions

0.0 2.0 0.0 147 KB

Perl Regular expressions made easy

Home Page: http://verbalExpressions.github.io

License: Other

Perl 100.00%

perlverbalexpressions's Introduction

Build Status Coverage Status

NAME

Regexp::VerbalExpressions - Perl Regular expressions made easy

SYNOPSIS

use Regexp::VerbalExpressions;

# Create an example of how to test for correctly formed URLs
my $re = verex
       ->start_of_line
       ->then('http')
       ->maybe('s')
       ->then('://')
       ->maybe('www.')
       ->anything_but(' ')
       ->end_of_line;

if ('https://www.google.com/' =~ $re) {
    print 'We have a correct URL'; # This output will fire
} else {
    print 'The URL is incorrect';
}

print $re; # Outputs the actual expression used: ^(?:http)(?:s)?(?:\:\/\/)(?:www\.)?(?:[^\ ]*)$

DESCRIPTION

Regexp::VerbalExpressions is a Perl module that helps to construct difficult regular expressions.

Other implementations

You can view all implementations on http://VerbalExpressions.github.io

API

Modifiers

  • anything()
  • anything_but($value)
  • end_of_line()
  • find($value)
  • maybe($value)
  • start_of_line()
  • then($value)

Special characters and groups

  • any($value)
  • any_of($value)
  • br()
  • line_break()
  • range($from, $to)
  • tab()
  • word()

Modifiers

  • with_any_case()
  • stop_at_first()
  • search_one_line()

Functions

  • replace($source, $value)

Other

  • add($expression)
  • multiple($value)
  • or()

SEE ALSO

https://github.com/VerbalExpressions/JSVerbalExpressions

LICENSE

Copyright (C) Takumi Akiyama.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHOR

Takumi Akiyama [email protected]

perlverbalexpressions's People

Contributors

akiym avatar mihai-vlc avatar

Watchers

 avatar  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.