Community Member Profile
- Profile: /members/2107-Steven-Levithan.htm
- URL: http://stevenlevithan.com
- Comments: 172
- Points: 105
Recent Blog Comments By Steven Levithan
-
The 5th Annual Regular Expression Day (And Prizes) - June 1st, 2012
Posted on Jun 4, 2012 at 12:18 PM
Make that 36. :) Jason Salvo, I played through it more than a dozen times, so the numbers I (and probably Ben Dalton) posted aren't entirely fair. Ben Nadel, some of the regexes are very well designed for this challenge. As Ben Dalton mentioned, the \b..\b style regexes, as well as so... read more »
-
The 5th Annual Regular Expression Day (And Prizes) - June 1st, 2012
Posted on Jun 4, 2012 at 11:26 AM
Better fire it up again, @Ben Dalton. I just scored 34. ;-) And I'm a slow typist.... read more »
-
The 5th Annual Regular Expression Day (And Prizes) - June 1st, 2012
Posted on Jun 2, 2012 at 6:38 PM
Love the game, Ben. I've played through it a few times, scoring between 14 and 23. So hey, other players, at least you know a number to beat. :) With some additional features, I think this could actually be a great learning tool. If you ever end up spending more time on it, one thing that m... read more »
-
ColdFusion 10 - reEscape() vs. Java Pattern's Quote() Method
Posted on Mar 29, 2012 at 2:38 PM
Good to see that ColdFusion is still giving regular expressions at least a little attention. :) For the record, here's how you can do this in various other languages: * Perl: quotemeta(str) * PHP: preg_quote... read more »
-
The Desire To Change Those We Care About
Posted on Jun 14, 2010 at 12:27 PM
@Ben Nadel, your friend Sabrina is most wise, and rather witty. :) My apologies in advance to her for stealing that quote.... read more »
-
reMultiMatch() - Extracting Iterative Regular Expression Patterns In ColdFusion
Posted on Jun 14, 2010 at 10:38 AM
This is coolness and very useful. I did something similar in JavaScript for the XRegExp.matchChain method ( http://xregexp.com/api/#matchChain ), with the added ability to pass forward a specific backreference to the next regex. I a... read more »
-
Different Browsers Use Different Non-Matching Captured RegEx Pattern Values
Posted on Jun 14, 2010 at 10:24 AM
This is a Firefox bug in the handling of nonparticipating capturing groups. The following (old) post of mine lists additional related browser bugs and other info: http://blog.stevenlevithan.com/archives/npcg-javascr... read more »
-
Ask Ben: Javascript String Replace Method
Posted on Feb 21, 2010 at 12:20 PM
@Wize, the details of what you're trying to do are not clear to me. E.g., what's the deal with matching "rem" case insensitively (are you trying to harmonize the casing?) and do you only want to replace the first single quote (that is not enclosed in double quotes) on each line? Anyway, wha... read more »
-
The Regular Expression Cookbook By Steven Levithan And Jan Goyvaerts
Posted on Jul 27, 2009 at 1:15 PM
Thanks, Ben (and Craig)! I've got to give props to coauthor Jan Goyvaerts though, who wrote a lot of the sections that you referenced.... read more »
-
ColdFusion Email Validation, IsValid(), And CFMail Errors
Posted on Jul 18, 2009 at 5:24 PM
@Ben Nadel, yes, it's valid according to RFC 2822--the special characters allowed as part of an email address's username are _!#$%&'*+/=?`{|}~^.-. At my last job I ran into single quotes in email addresses a lot. It's unfortunate that a lot of naïve validation (including CF's isValid, etc.) disal... read more »
-
Ask Ben: Converting Javascript Lists To Arrays
Posted on Nov 5, 2008 at 4:12 PM
@Rohit, using capturing parentheses in your split pattern probably didn't work for you since you're using Internet Explorer, which doesn't follow the JavaScript split specification on that point. It will work if you first run the following script, which fixes String.prototype.split cross-browser:... read more »
-
Got My Sweet-Ass T-Shirts From Steven Levithan's Regular Expression Contest
Posted on Sep 13, 2008 at 7:48 PM
Coolness! Way to bring out the secret admirers. ;)... read more »
-
Partial Entry For Steve Levithan's Regular Expression Contest
Posted on Jun 13, 2008 at 10:48 AM
Nice. Wow, you put a lot of work into that... more than I was expecting from contestants. Parsing XML with regular expressions is something I've wanted to take a stab at for a long time since it sounds like a lot of fun (even though there are established implementations and possibly better approa... read more »
-
June 1st 2008 - National Regular Expression Day! (Post A Comment, Win A Prize)
Posted on May 29, 2008 at 5:17 PM
@Ben Doom, lolz. :) (Again, not a Perl hacker, but replacements are done with s/// [s stands for substitution].)... read more »
-
June 1st 2008 - National Regular Expression Day! (Post A Comment, Win A Prize)
Posted on May 29, 2008 at 4:38 PM
@Ben Doom, I'm not a Perl hacker, but I know that adding the "m" in `i =~ m/(^)(?:.*)($)/;` doesn't change anything. Some people have a preference to always use it, or not. @Eric, the parens and the bit about some adjustments being in the spirit of xkcd/208 threw me off, but "I am the alpha... read more »
-
June 1st 2008 - National Regular Expression Day! (Post A Comment, Win A Prize)
Posted on May 29, 2008 at 2:53 PM
@Eric, how do you read those? I'm sure I'm missing the joke.... read more »
-
June 1st 2008 - National Regular Expression Day! (Post A Comment, Win A Prize)
Posted on May 29, 2008 at 6:03 AM
@Jane, I haven't posted what prize I'm interested in, so I'm not in the running (intentionally).... read more »
-
June 1st 2008 - National Regular Expression Day! (Post A Comment, Win A Prize)
Posted on May 29, 2008 at 5:43 AM
Thanks for starting this, Ben. I've posted my own regex contest / giveaway at http://blog.stevenlevithan.com/archives/regexday-2008 . Of course, everyone here is welcome to participate there as well.... read more »
-
June 1st 2008 - National Regular Expression Day! (Post A Comment, Win A Prize)
Posted on May 28, 2008 at 2:15 PM
@Ben, yes. More specifically, it's what I call a capturing-group-participation-based conditional, which is a bit of a mouthful (and is not official terminology for any particular regex flavor). For the sake of deriving some kind of meaning, I suggest you read the regex as "If match 'me', ma... read more »
-
June 1st 2008 - National Regular Expression Day! (Post A Comment, Win A Prize)
Posted on May 28, 2008 at 1:26 PM
> post a comment below [...] on how > much you like regular expressions I will express my love in regex. (?i)(me)?(?(1)\u2665((?:reg(?:ular expressions?|ex(?:p|e[ns])?)))|(?!))(?>\1\2) @Eric, I've debugged that shirt, too. See: read more »



