3 ms·
None that I know of. My thought process has always been that regex was language agnostic. I think Perl has its own version that is widely used. But other than t
by just_myles 7y ago
None that I know of. My thought process has always been that regex was language agnostic. I think Perl has its own version that is widely used. But other than that, I do not know.
- caymanjim 7y agoPerl's is a superset ("PCRE" - Perl Compatible Regular Expression). It's now supported by a lot of other tools, not least of which is GNU grep.
- Lordarminius 7y ago> My thought process has always been that regex was language agnostic. +1 I was surprised to find that regex in python was not much different from the language I use ruby. Would anyone with sufficient knowledge care to eli15 why this is and how it is implemented ?
- cutler 7y agoRuby's regex engine is Onigmo which is very similar to Perl 5.10. Perl was one of Ruby's main influences, along with Smalltalk and Lisp, whereas Python's BDFL was never a fan of Perl. However, Perl's implementation of regular expressions (PCRE) has been widely adopted hence the similarity you refer to. If you compare with Javascript and PHP you'll find they're all similar.
- redis_mlc 7y agoPerl is a superior language. Besides being the fastest scripting language by far ... Ruby was inspired by it. Python stil can't do forward references, amongst many other puzzling limitations. I'm sure Python 3's split() improvements were copied from Perl.