gskinner / regexr Goto Github PK
View Code? Open in Web Editor NEWRegExr is a HTML/JS based tool for creating, testing, and learning about Regular Expressions.
Home Page: http://regexr.com/
License: GNU General Public License v3.0
RegExr is a HTML/JS based tool for creating, testing, and learning about Regular Expressions.
Home Page: http://regexr.com/
License: GNU General Public License v3.0
I have clone this rego in my computer and then I build the package using grunt as instructed in README file. But I can't make it run without internet connection. How can I run this apps without internet connection?
It appears multiline matching is on no matter what the checkbox says.
If you try for instance ^[^]*$
greedy matches all lines, instead of just the current line.
The current handling of mobile devices is problematic, in part because the text is too small to read, and also because it's fairly non-specific.
Some mobile devices (Chrome on Android) seem to work fine with RegExr, and those that don't still generally render ok but lack functionality (ex. editing doesn't work in iOS).
We should break this into two solutions:
Mobile browser detected.
RegExr isn't optimized for mobile devices yet. You can still take a look, but it might be a bit quirky.
Requirements:
If you are interested in helping with translation (or any of the other steps), please comment below and subscribe to this issue, so you receive notifications when we start working on this feature.
Not a bug... mostly a suggestion for improvement. Currently the textarea for placing the text that you would like to match allows up to 3K characters. It would be be nice to allow more characters... actually without any limit.
It seems that ampersands ('&') aren't visible when typed in the 'Expression' field, though they can be input. The following line was copied into the 'Expression' field:
"/\b([a-z])(?:-N-|&| (?:and|&) )([a-z])\b/ig"
And appeared as:
(red arrow indicates invisible character)
The regex performed properly, even though the character was invisible.
I put below expression, I got the error 'Lookbehind is not supported in Javascript'.
(?<=ABC)
I hope it will be solved soon. Thanks
I find the desktop app very useful. The web version with new UI is awesome. Can you please update the Adobe Air app as well?
Dragging a text file to the text panel does not load its contents in the panel. Instead, the text file opens in a new browser tab. I am using IE9 and do not have the option try a different browser. Also, v1 is not loading in my browser anymore either. I only see the banner about using the new version instead.
I can't save if I don't select a pre-made tag for my last tage.
Even /.*/g also reports this error
First off, v2 looks great, nice job!
There are (at least) 2 things that work differently compared to v1. I'll make 2 separate issues for them.
Inline flags don't work anymore: /(?m)^./g
does not get accepted (I know I can set the equivalent m
flag in the upper right corner, but I type quicker than moving my mouse pointer all the way to the upper right corner).
A few days ago, I could update an old save, but now I can not.
Not a big deal, but rather not have to update the URL 2-3 places in other GitHub repos.... Don't want to spam PRs every time I want to tweak some tests.
v1 had a convenient "overview" section in the bottom where the capturing groups could be observed in a list
hopefully it is planned for v2 and will be as sophisticated as the HiFi Regex Tester table output
http://www.gethifi.com/tools/regex
Hi!
I'm happy to see the new RegExr. I love it. But I've a problem with this. I have an English-keyboard MacBookPro, but I'm hungarian, so I modified the keyboard layout.
For example "*" character is the "Alt+B" here, and the "[" is the "Alt+F". These shourtcuts makes something else (maybe a simple jump) in your software. Can I disable these shortcuts? It would be good...
When opening the page with Firefox 29 the message "RegExr requires a modern browser" pops up and doesn't permit to keep moving.
However, when I start an incognito window on the same Firefox then the page opens and works exactly as intended.
Perhaps a problem with cookies left after a Firefox upgrade?
Just wanted to share the feedback, you're doing a great work. This is the coolest regex UI I've ever found, using it since many years now.
The v1 of regexr was able to handle regexs with the python named groups tags inside of them. E.g. (?P<name>...)
For example the regex ": (?P<capture>.*)\\n[A-Za-z-]+:"
happily works in v1, but in v2 I get an error "Invalid Target for Quantifier"
There's a limit to how much text one can paste, but the tool silently ignores the extra content without giving a noticeable warning to the user. Ideally, the limit should be lifted, but in case that's not possible, at least some warning should be shown.
Currently the matched result and groups in the match tooltip are truncated to fit in the tooltip.
So there is no way to see if your groups have the correct match (at the end) when working with longer texts.
Are there any plans to improve this? Like a sidebar/panel to show the whole content of a single match including all the matched groups (with a scrollbar for the whole panel or per group).
Where the info shown is based on the selected group in the main editor.
The feature regexper.com is very good as well.
Would you please merge it into regexr?
The graphic explain about regex code. is very clean and clear
2.0 looks great! I'm excited about it.
I noticed there doesn't seem to be a way to change or remove the forward-slash pattern delimiters. This would probably be a useful feature especially since some environments do not require delimiters.
Zero width matches, like (?=b)
, give an error saying that there are an infinite amount of matches for them (which is not true, of course).
The Reference section is good for in-depth info & examples, but it might be nice to have a simple "quick reference card" or "cheat sheet" somewhere, that shows the most common tokens with a super brief description.
Ideas for placement:
We could even deep link tokens into the Reference section, so people could drill in for more in-depth info & samples.
Under character classes:
[a-g] charcter between a & g
should be:
[a-g] character between a & g
Hi,
i think unicode support would be a nice to have.
Please add string escaping tool
Like this https://docs.python.org/2/library/re.html#re.escape
Have you thought of adding a feature that users can login (via GitHub, Google Accounts, Facebook, Twitter etc) to sync their favourites, RegEx created by them, and (maybe) even saving test cases that they use often. Auto save can be included with this feature easier
Selection of regexp with Ctrl+A or by mouse from the expression line selects just body not slashes and flags. It will be useful to add small button that copies full expression to the clipboard.
When using Chrome/Internet Explorer, if I paste the following regex into the expression box: /{{(\s_[^\s{}]\s_)*}}/g
When deleting the first two curly braces, it immediately locks up the page, rendering it completely unresponsive. Can't click on anything, type, etc...
I would imagine this is because it somehow entered an infinite looping state.
Oddly enough, this happens only when on a freshly opened Regexr page, with the default test strings in place. I haven't been able to recreate this issue when the test strings are modified.
Hope this helps solve whatever the underlying issue is. For what it's worth, I absolutely love this tool and hope you continue the good work on it.
Lookbehinds were supported in version 1 and they are missing in version 2. Is there a plan to fix this?
It will show 'html' as bold text in the match tooltip.
When doing a lot of matching in HTML the result tooltip will be empty a lot of the times because of weird HTML result rendering.
Currently for browsers that support the onbeforeunload
event, when you try to navigate away from www.regexr.com, a JavaScript message pops up to ask if you really want to leave the page. It would be nice if there was an option you could set so that this is disabled (and this is remembered for each successive visit to the website).
When self-hosting and using SSL Firefox throws a mixed content warning requiring user interaction for regexr to fully load.
Line 81 in index.html change from:
<script src="http://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js"> to <script src="https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js"> gets rid of the mixed content warning. Not sure if you want to change this or add some logic to detect if SSL is being used and automatically use the https version of Google APIs instead of http.Loaded site (www.regexr.com) and default regex has highlighting errors. Top two paragraphs display fine, but highlighting for "Sample" and uppercased alphabet in the third paragraph is displayed on the line below the actual match. Resizing the browser window fixes the issue. It may be related to window width, but unfortunately I cannot reproduce and do not have a full screenshow showing window size.
Python's re library allows for named capture groups for example if my string is
symbolic link to `filea'
Then I could write a regular expression like this
/\`(?P<fname>[\w\d]+)\'/
This works in python however I get an error "invalid target for quantifier" under the P in regexr. Are named capture groups python specific?
It appears to currently be impossible to substitute a newline in the output. This might be a limitation of the code mirror framework in use.
And i suspect, it hits any non-latin word chars.
But, for example, php implementation supports \w
correctly. As result, i cannot use regexr for designing regexes to be used in php projects ๐
I can only type 100 characters in substitution string, which is too short a restriction in some cases.
Put cursor to the end of the string, change keyboard insert mode and you will be able to type some chars that will overwrite finishing slash and flags.
Can be the replaced text highlighted the same(ish) way as the matched text in Text window? It would be much easier to see the results everywhere than trying to find out if, how and where my substitution worked.
Thanks :)
To expand on the current sample Text, and present a slightly cleaner landing page, it might make sense to add a Sample Text section to the library, with expanded samples of different data types.
For example, "Phone Numbers" could contain a variety of numbers from different countries.
Phone, email, date/time, postal / zip codes, urls, html, ip addresses (incl IPv6), numbers, colors, code (comments, functions, etc), css.
I'm sure there are other categories, which people could request here or issue pull requests to add once the core feature is in place.
It would be nice to support other RegEx flavours. This is a major task, requiring a number of different enhancements:
For now, this issue will just be a place to brainstorm approaches, and identify challenges.
TIA
The box in the upper right corner (which is counting the matches) has a wrong plural form, if there is only 1 match.
The lines responsible for this are:
https://github.com/gskinner/regexr/blob/master/js/views/DocView.js#L463-L464
Shall I write a quick pull request?
Would be nice to have the titleTxt
displayed in the <title>
&/or top-line of the site, between "RegExr v2.0" & by gskinner.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.