RegExr: Learn, Build and Test Regex
11–20 of 52 posts
Re: RegExr: Learn, Build and Test Regex
#12Re: RegExr: Learn, Build and Test Regex
#13I switch between this site and debuggex.com depending on what I’m doing at the time. I find they both have their strengths for specific tasks.
In fact, I was just on it this morning!
Re: RegExr: Learn, Build and Test Regex
#14(I’m too much of an idealist for my own good.) I’m sure that these resources are great. And it’s not their fault that the regex family of languages evolved in the way that they did. But the simpler regex languages (without backreferences and other stuff… that I might not even know about) seem simple at first glance. In a perfect world I want to just spend and hour internalizing them forever. But in practice it seems…
When in doubt, just throw a backslash in front of it, which always means "the next character is to be interpreted literally," even in cases where it's not necessary.
(Well, not always; the backslash will invoke a special character when thrown before some letters; eg, "\t" means the tab character. But normal letters never need to be escaped; just punctuation.)
Re: RegExr: Learn, Build and Test Regex
#15Re: RegExr: Learn, Build and Test Regex
#16I switch between this site and debuggex.com depending on what I’m doing at the time. I find they both have their strengths for specific tasks.
What's the diff? I love regexr and credit that site to my finally understanding regex. In fact, I was just on it this morning!
Re: RegExr: Learn, Build and Test Regex
#17Re: RegExr: Learn, Build and Test Regex
#18I'd like a tool similar to this but for sed or awk usage. Like to see interactively what would be the output for given input and command. Particularly for the toolchain distributed with Ubuntu. I believe demand for such tool would be greater than just me. Let me know if you know one!
Re: RegExr: Learn, Build and Test Regex
#19This one is my go-to. But it would be a lot better if it didn't display an alert when you try to leave the site. I've started to try and find alternatives.
Re: RegExr: Learn, Build and Test Regex
#20Is there a list of regex patterns for common usecases like imei/geo cordinates etc. somewhere . My google searches are leading me either to regex tutorial sites or regex libraries. There are handful of results for emails/url etc. but not getting exhaustive list.
Something like IMEI should be pretty easy, if Wikipedia [0] is to be trusted (e.g. in Python):
# Matches IMEI and IMEISV
imei_pattern = re.compile(r"\d{2}-\d{6}-\d{6}-\d\d?")
You could write a big monster pattern that sets up capture groups for all the different TAC and Check Digit variants, but why bother? Just slice off what you need from the result after matching.0: https://en.wikipedia.org/wiki/International_Mobile_Equipment...