Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: Regex: What does ?k: mean?

by davido (Cardinal)
on Feb 25, 2017 at 00:29 UTC ( [id://1182770]=note: print w/replies, xml ) Need Help??


in reply to Re^2: Regex: What does ?k: mean?
in thread Regex: What does ?k: mean?

Regexp::Common isn't really a go-to for debugging. I guess what I meant to convey was that if I have a Regexp::Common call that isn't matching as I expected and want to see what the pattern looks like, that's an easy way to dump it (diving into the source can be opaque if all you want is to see what the pattern looks like).

For debugging patterns, I really like Regexp::Debugger. It allows you to step through the match and watch what's happening.

You are correct that YAPE::Regex::Explain is outdated. The main problem is that the last time I checked, it stopped being developed during Perl 5.6's reign, and consequently doesn't know about features that were added to Perl after 5.6. Since Perl 5.6 is now 14 years in the past, it would seem that YAPE::Regex::Explain has been left behind. In fact, after 2001 nothing new happened to the module until 2010, and that flurry of activity (two releases) was just for bugfixes and documentation enhancements. One of the doc enhancements was to explicitly state that only regexes using constructs that were in 5.6 are supported. It's useful to those starting out trying to learn regexp basics, but it doesn't take long to discover newer constructs that fool it.


Dave

Replies are listed 'Best First'.
Re^4: Regex: What does ?k: mean?
by stevieb (Canon) on Feb 25, 2017 at 00:40 UTC

    Thank you for this very informative feedback. I hadn't even heard about Regexp::Debugger before. I will pursue.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1182770]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-04-19 05:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found