Code Monkey home page Code Monkey logo

sgregex's People

Contributors

archo5 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

skyformat99 phaag

sgregex's Issues

regex for "dutch phone numbers" test case

I'm testing a few "real world" regex's from regexlib.com.

This "dutch-style phone number" regex does not match "023-5256677" but it should.

(^+[0-9]{2}|^+[0-9]{2}(0)|^(+[0-9]{2})(0)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9-\s]{10}$)

It works on these:

Matches
+31235256677 | +31(0)235256677

Non-Matches
+3123525667788999 | 3123525667788 | 232-2566778

Crash without group parentheses,

Hi,
I am just evaluating a small C regex library and found your project. Thanks for that project!

However, I have a problem, that the matching process crashes:

Assertion failed: (R->captures[ 0 ][1] != RX_NULL_OFFSET), function srx_MatchExt, file sgregex.c, line 1218.
' like 'GET|POST'+Abort

You can reproduce this, if you add the following line in sgregex_test.c in the MATCHTEST section:

MATCHTEST("GET /index.html HTTP/1.1\r\n", "GET|POST", 1);

If you add group parentheses, it works:

MATCHTEST("GET /index.html HTTP/1.1\r\n", "(GET|POST)", 1);

Although "GET|POST" is a valid regex, it crashes.

Thanks for your support.

regex for "US currency" test case

I'm testing a few "real world" regex's from regexlib.com.

This "US currency" regex does not match "$1,234,567.89" but it should.
^$([0-9]{1,3}(,[0-9]{3})*|([0-9]+))(.[0-9]{2})?$

It works on these:

Matches
$0.84 | $123458

Non-Matches
$12,3456.01 | 12345 | $1.234

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.