Giter Site home page Giter Site logo

Comments (10)

gskinner avatar gskinner commented on August 19, 2024

Can you please provide a use case for a long substitution string? What would be a more appropriate max length for you? 200 chars? 1000 chars?

from regexr.

sparkyfen avatar sparkyfen commented on August 19, 2024

1000 please.
Here is one that I am messing with:

(^access-list\s(.*)\sextended\s(permit|deny)\s(ah|eigrp|esp|gre|icmp|icmp6|igmp|igrp|ip|ipinip|ipsec|nos|ospf|pcp|pim|pptp|snp|tcp|udp|\d)\s(\d*[.]\d*[.]\d*[.]\d*|any)\s(\d*[.]\d*[.]\d*[.]\d*|host)\s(\d*[.]\d*[.]\d*[.]\d*|host|object-group)\s(.*)\s(\d*[.]\d*[.]\d*[.]\d*|object-group|(eq|lt|gt|neq))\s(.*))|(^access-list\s(.*)\sextended\s(permit|deny)\s(ah|eigrp|esp|gre|icmp|icmp6|igmp|igrp|ip|ipinip|ipsec|nos|ospf|pcp|pim|pptp|snp|tcp|udp|\d)\s(\d*[.]\d*[.]\d*[.]\d*|any|host)\s(\d*[.]\d*[.]\d*[.]\d*|host)\s(\d*[.]\d*[.]\d*[.]\d*|host|object-group|any)\s(\d*[.]\d*[.]\d*[.]\d*|))|(^access-list\s(.*)\sextended\s(permit|deny)\s(ah|eigrp|esp|gre|icmp|icmp6|igmp|igrp|ip|ipinip|ipsec|nos|ospf|pcp|pim|pptp|snp|tcp|udp|\d)\s(\d*[.]\d*[.]\d*[.]\d*|any|host)\s(\d*[.]\d*[.]\d*[.]\d*|any)\s(\d*[.]\d*[.]\d*[.]\d*|any))|(^access-list\s(.*)\sextended\s(permit|deny)\s(ah|eigrp|esp|gre|icmp|icmp6|igmp|igrp|ip|ipinip|ipsec|nos|ospf|pcp|pim|pptp|snp|tcp|udp|\d)\s(\d*[.]\d*[.]\d*[.]\d*|any|host)\s(\d*[.]\d*[.]\d*[.]\d*|any))

It allows for Cisco ASA configuration parsing for lines that match crazy things like:

access-list <acl name> extended permit|deny <protocol> <ip|'any'> <subnet|'host'> <ip|'host'|'object-group'> <subnet|ip|group name> <subnet|'object-group'|('eq'|'lt'|'gt'|'neq')> <ip>

Though I'm sure I could write one a bit better <_<

from regexr.

gskinner avatar gskinner commented on August 19, 2024

@brutalhonesty Thanks, but that's an expression string. Expressions are currently limited to 1000 characters. Substitutions are currently limited to 100 chars.

from regexr.

sparkyfen avatar sparkyfen commented on August 19, 2024

@gskinner Whoops, sorry, thanks. I did noticed though that some of the content got cut off when I paste the whole string into the site. Don't know why this is the case.

from regexr.

gskinner avatar gskinner commented on August 19, 2024

@brutalhonesty hmm... ya, looks like your pattern is 1020 characters long. Maybe we should bump the max pattern length up to 1024. :)

from regexr.

sparkyfen avatar sparkyfen commented on August 19, 2024

@gskinner That would be great! πŸ˜„

from regexr.

deltamaster avatar deltamaster commented on August 19, 2024

@gskinner @brutalhonesty Yes... It is just too easy to exceed the limit. My last case had around 200 characters. It would be great if the limit can be changed.

from regexr.

gskinner avatar gskinner commented on August 19, 2024

I don't want to go too overboard with this, but maybe we will bump up to 2500 chars for patterns + 500 chars for substitution, and see if this comes up again. We will have to make sure to update the server at the same time (it also enforces these limits).

from regexr.

gskinner avatar gskinner commented on August 19, 2024

We have bumped this up to 2500 characters for the Expression, and 500 characters for Substitution.

Feel free to reopen with use cases if this still isn't enough.

from regexr.

sparkyfen avatar sparkyfen commented on August 19, 2024

Thanks!

from regexr.

Related Issues (20)

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.