Comments (10)
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.
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.
@brutalhonesty Thanks, but that's an expression string. Expressions are currently limited to 1000 characters. Substitutions are currently limited to 100 chars.
from regexr.
@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.
@brutalhonesty hmm... ya, looks like your pattern is 1020 characters long. Maybe we should bump the max pattern length up to 1024. :)
from regexr.
@gskinner That would be great!
from regexr.
@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.
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.
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.
Thanks!
from regexr.
Related Issues (20)
- Failing result in a particular Regular Expression HOT 2
- Suggestions about test module: add import and export button for many texts to be tested
- Incorrect matches when using Unicode exponents like βΏ
- [feature request] automatic gist backup for github users HOT 2
- Extended Unicode escape doesn't seem to accept hexadecimal digits. HOT 1
- Feature request: load expression snippet from query HOT 1
- Save (Ctrl+S) feature doesn't work in some cases HOT 4
- Hope to support multiple languages HOT 1
- Convert Regex value to its string contain HOT 1
- unexpected error on `/\p{Script=Han}/gu` HOT 1
- Site is down with Invalid SSL certificate Error code 526 HOT 2
- The page isnβt redirecting properly HOT 6
- Remove most "may not be supported in all browsers" warnings?
- Lost changes and tests HOT 2
- Feature request: Capability to reorder tests
- Feature request: Add export/import feature
- Feature request: Add 'Match all' option
- Minor issue with Unicode characters in input fields
- Feature request: Special characters display in Tools tab
- Integrate ReDoS checking
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from regexr.