-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Displays the details of the Match object returned by the Regex call.… #627
Conversation
…Handles much of Issues 76 & 481.
Hello, Here is a suggestion at how we could improve it: Getting inspired from https://regex101.com/ and using your example of There would still be the group names, the location of the match along with the matched text. But it would overall take much less space and probably be less overwhelming. Alternatively, or in addition, the matches could be showed as a JSON: [
[
{
"content": "ABC123-x12",
"isParticipating": true,
"groupNum": 0,
"startPos": 0,
"endPos": 10
},
{
"content": "ABC",
"isParticipating": true,
"groupNum": 1,
"groupName": "Letters",
"startPos": 0,
"endPos": 3
},
{
"content": "123",
"isParticipating": true,
"groupNum": 2,
"groupName": "Digits",
"startPos": 3,
"endPos": 6
},
{
"content": "x12",
"isParticipating": true,
"groupNum": 3,
"startPos": 7,
"endPos": 10
}
],
[
{
"content": "XYZ123-x12",
"isParticipating": true,
"groupNum": 0,
"startPos": 11,
"endPos": 21
},
{
"content": "XYZ",
"isParticipating": true,
"groupNum": 1,
"groupName": "Letters",
"startPos": 11,
"endPos": 14
},
{
"content": "123",
"isParticipating": true,
"groupNum": 2,
"groupName": "Digits",
"startPos": 14,
"endPos": 17
},
{
"content": "x12",
"isParticipating": true,
"groupNum": 3,
"startPos": 18,
"endPos": 21
}
]
] What do you think? |
Yes, all that sounds fine. Funny thing -- I've already written the JSON output option, along with the Substitution panel (also stolen from regex101.com). They were part of a Phase II update which I was holding off until I got some feedback on this one. (The UI I have for these is a disaster, but I'll work on it to make it presentable) |
Awesome! :D |
It looks much better already! :D Thank you so much! I really like this list, it's much easier to read. Also, I think the JSON is something optional. I'd suggest doing either one or the other (the list sounds better to me) and wait to see if customers are actually asking for JSON. Some feedback on the UI:
|
Hello, I played a little bit with the UI and came up with the following. What do you think? It still isn't perfect in my opinion, but it's getting closer from something consistent with how other tools work:
Remaining details that could potentially be improved:
I committed my suggestion in a separated branch here, feel free to take a look: e17c7a3 What do you think? |
I like the new look, particularly for the error message. (As I said, my UI skills aren't that good) |
No worries :) If you want I can add these changes to your branch, or you can do it. Up to you. Please let me know ;-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello,
I allowed myself to address the last feedback :)
I will merge this PR, thank you again for this contribution :D
…#627) * Displays the details of the Match object returned by the Regex call. Handles much of Issues 76 & 481. * Show Replacement text * Redesigned details output * Removed Replacement panel, cleaned up UI. * Addressed feedback Co-authored-by: Etienne BAUDOUX <ebaudoux@velersoftware.com>
… Handles much of Issues 76 & 481.
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Regex Tester merely highlights matches.
Issue Number: #76
Issue Number: #481
What is the new behavior?
Additionally, it now also displays a grid at the bottom that shows all the properties of the (.NET CLR)
Match
objects returned by the Regex call. This is modeled from the display of the Interactive Regex Evaluator example included with LinqPad.Other information
Two notes:
DataGrid
inside aDataGrid
inside aDataGrid
, and used different colored borders to visually sort them out.ViewModel.String
difficult from three levels deep in DataGrids. But then I realize that these are names of properties of a .NET class, and would need to be referred to by their English names in code, which would be the whole reason for this feature.Quality check
Before creating this PR, have you: