Closed DRSDavidSoft closed 8 years ago
My opinion is that regex101 is a regex testing tool, and you are better off using a proper tool (SublimeText, Notepad++, Atom, or a language/text editor of your choice) if you need further process of the result.
@nhahtdh I agree, and I actually use Notepad++ for my text processings. However I have three reasons as to why this is reasonable in my opinion.
regex101 is a regex testing tool
" and Notepad++ isn't. Most often I need to debug and perfect my RegEx first, before I can use it. It doesn't make sense to test and debug my RegEx, and the copy and paste it in Notepad++ while RegEx has a really nice and handy Export Tool right built in itself.Believe, it makes no sense to copy the output from RegEx 101 and paste it to my own web app just to remove duplicate entries.
My theory is if it doesn't have any harm to add more features, and the code is written (or easy to write), why not add the feature. If you are concerned about cluttering the visual (which I also understand), the solution is to simply add a tiny icon to the page, which upon click shows the export "options".
I see no harm in RegEx 101 be also a processing and extraction tool as it is for testing and debugging. It already has tons of RegExes in its library which users contribute too, I can save my own ones where I can use them in the future, it is a web application which means I can use it virtually almost anywhere on any operating system with access to internet, and most important of all, writing RegEx is not something that you can quite get it right at the first try. You need to first test and debug it before use it, which is what RegEx 101 for!
I really encourage any exporting options to be added in the future, if any other dev have ideas, written a code, or requires some kind of processing to be done on the output.
Please, there is almost no reason not to do this. I'd be really grateful if this could be added to RegEx 101! :)
P.S. Also add a download button in my opinion, to give the entire file in matches.json
, matches.csv
, and matches.txt
format. It's easy and super useful in my opinion!
P.S. Also add a download button in my opinion, to give the entire file in matches.json, matches.csv, and matches.txt format.
If you want download button, please open a new issue - it's tangential to this request.
My theory is if it doesn't have any harm to add more features, and the code is written (or easy to write), why not add the feature.
My opinion is that Regex101's scope is a regex tester and debugger, not a full-fledged text editor. I wouldn't want to bloat it with a bunch of text editing features that only a handful of people actually use. There is also the option to implement them yourself with userscript, though I'm not sure how easy/hard it is to inject script on regex101.
Anyway, I'm more of a contributor rather than the owner of this project. Firas will have the final say about this.
I agree with @nhahtdh, we have to draw a line somewhere, and I think this is a good place. You want something specific to your use case, which very few are likely to use. You can just slap the result into a terminal window and sort/uniq it there.
@firasdib Thank you, and I understand your point.
However, I was wondering if could I ask for any other official method (such as plugins, userscripts, etc...) to make it directly work in RegEx 101. I understand that you don't want to make RegEx101 bloated with rare use cases as @nhahtdh said, but I think a general method to add more features will be useful. Therefore a user can write needed code and use it for themselves rather than bloating the entire project.
Without official support, I have to write a Userscript, and by studying common.regex101.js file, I have to override the $("#scroll_match").on("click",".export_matches",function(){**...**});
function in order to modify the method, which I don't approve if an official API could be provided.
For as many times as I have to copy the input into RegEx101, test and debug my regex in RegEx101, open matches in RegEx101, paste it to a terminal and sort|uniq it, select and copy the results on a regular basis, it both is a pain, and reduces the productivity by wasting time. As I mentioned, I've written another web app to make this more easy, but I just wished this could be built directly inside RegEx 101.
If supporting/allowing plugins isn't accepted (even in the 2.0 version), it's still fine. As I said, I understand. Regex101 is still a great tool to use :)
Problem is I believe there are very few people that will use this feature, or even "plugins", that its not worth the time or effort. I'm sure you understand. If I get more requests of the same nature I will definitely consider it.
@firasdib I know this ticket is closed, but this thing is on my mind: If I write a code for that, and you make sure it's a) lightweight so it wouldn't bloat the app and b) well-hidden so it wouldn't distract the user, would you let them survive inside Regex101?
If you wouldn't allow, it's still fine, and I respect your opinion. Regex 101 is still great! But if you do, it would be really appreciated. I don't like using the modified and reverse-engineered offline version that I had to make in order to use these features.
Thanks!
Hi, and thanks for the great app! I've been using Regex101 for quite a while both for debugging my regular expressions, and to filter and capture data from strings.
One thing that I often need, is to sort the matches, and only keep the unique ones. So, if the matches are for example, 'c', 'b', 'a', 'c', I need to get 'a', 'b', 'c' from it.
I have written a piece of JS code that does exactly this on plain text separated by a new-line, and I was wondering if you could integrate something similar that would filter-out duplicated content, and sort the rest.
Here's my code:
This feature can be enabled by demand, using a checkbox in the "Export Matches" window.
Thanks again, and please let me know if I can help. This is a great tool, and I'd be glad if I can contribute in any way!