Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Command to identify matching regex

See original GitHub issue

Frequently in the recent past, we have had some “wtf” moments when an innocuous-looking phrase in a post triggered a “bad keyword in answer” or similar. Troubleshooting these is slow and somewhat demanding. Couldn’t we have Smoke Detector simply tell us which regex matched?

This was explored in the past when Quartata (I think it was) looked into having this information available for every post, but it turned out to be too slow.

A much less imposing solution would be to only provide this information when it is explicitly demanded, perhaps through a dedicated command.

I propose !!/bisect though it’s probably too obscure. “Why” is already taken and !!/wtf is probably too easy to type in by mistake … Additional proposals welcome.

The implementation I am imagining would check the input against everything, then gradually discard more and more of the blacklists until it has identified a single regex which is responsible for the detection.

(Corner case: What if a phrase matches more than one?)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

iBugcommented, Dec 1, 2018

@tripleee I’m thinking of only running the check against the blacklists and watchlists, not the fixed regexes in function-based checks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Regular Expression (Regex) Tutorial
To match a character having special meaning in regex, you need to use a escape sequence ... Test under the Python Command-Line Interpreter...
Read more >
Linux Find Command With Regular Expressions - Baeldung
In this tutorial, we'll talk about the use of the command find with regular expressions (regex).
Read more >
Using Grep & Regular Expressions to Search for Text Patterns ...
Grep is a tool used to search for specified patterns within text input using regular expressions. Regular expressions are a system for ...
Read more >
Match regex
The Match regex command checks the conformity of a character string with respect to a set of synthesized rules by means of a...
Read more >
Regular expression syntax cheatsheet - JavaScript | MDN
Matches a control character using caret notation, where "X" is a letter from A–Z (corresponding to codepoints U+0001 – U+001F ). For example,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found