Sponsored by Dragon Age: Origins
Follow the Dragon Age: Origins development team on Twitter view!
twitter.com/DragonAge - EA presents BioWare's new dark fantasy epic Dragon Age: Origins. '9/10' from Game Informer.
52 Comments
- jdelator, on 05/07/2009, -0/+46Holy crap a programming article on the front page! GJ Digg!
- fahrvergnuugen, on 05/07/2009, -0/+28Dugg for there being a god damned tech article on Digg.
- jggube, on 05/07/2009, -2/+29regex is one of the more complicated concepts a developer has to learn. The syntax itself is simple, but the logic is what gets most beginners stuck. This is a good and solid introduction to more advanced regex pattern matching.
- MelekTawus, on 05/07/2009, -1/+16I find a high fiber diet helps.
- UberNick, on 05/07/2009, -0/+14I've found the opposite to be true-- regex's unique syntax presents a bit of a learning curve, but once learned, using them effectively for most tasks is much easier than using custom string manipulation libraries.
- tdmeth, on 05/07/2009, -0/+14Everybody stand back....
http://xkcd.com/208/ - stix213, on 05/07/2009, -0/+9Step 0: Use "The Regex Coach" to prototype your regex's extremely quickly, so you don't have to test run your script a dozen times before you get your regex right when you make a simple mistake.
- nextekcarl, on 05/07/2009, -0/+9It is fine to hate them, as long as you can acknowledge that some things would be extremely difficult without them.
- DecoyQ, on 05/07/2009, -0/+8What did you expect? A picture of an animal from flickr with a cute caption?
- aamer, on 05/07/2009, -0/+8Wow, most "advanced" tutorials just give the same old crap. This one, however, really taught me a ton of stuff I never knew.
- jschrab, on 05/07/2009, -0/+8Regular expressions are something that make me wish I could have a class taught by a pro, drill it into my head for a week and be done with it - instead of taking years with a few minutes here and there to learn it. Regardless of the development technology you use, you will come across regex's. So to know how to use it well is something I could take with me as times change.
So - does Jeffrey Friedl teach a regex course somewhere...? - BenRT, on 05/07/2009, -1/+8I love regex. Sure, writing an actual regex search pattern is a colossal headache, but once you get it right, it's brilliant! <3
- Laminarcissus, on 05/07/2009, -0/+7Never has anything been so inaccurately named as Regular Expressions.
- xt0ph3r, on 05/07/2009, -0/+7I actually like writing the regex pattern. It's like a mini-game. :)
Maybe I need help. - LonelyTylenoL, on 05/07/2009, -0/+6Quick!
There's a Python in your yarn basket... - justncase80, on 05/07/2009, -1/+6If you have a problem that requires a regular expression... you now have two problems.
- 83457, on 05/07/2009, -0/+5RegEx is one of those tools that once learned can save countless hours. I don't mean just with searching or manipulating strings in programming but also in using text editors and file search utilities that have it as an option (Eclipse, WinGrep, Dreamweaver, Notepad++).
- MindTrip51, on 05/07/2009, -0/+5Hmm, something useful on digg, that's new. Thanks for posting man.
- gabbagabbahey, on 05/07/2009, -0/+5Regex Coach is your friend, http://weitz.de/regex-coach/
- gamepr0, on 05/07/2009, -1/+5Personally i think the syntax is the most complicated thing to learn.
it's hard to remember all these symbols and their functions, add to that that complicated regexes become way too big to easily understand them and regex becomes an annoyance - grow, on 05/07/2009, -0/+4Not even close to validating ALL emails, though. There are some very strange "valid" email addresses out there that this would choke on. I've seen some really stupid ones like "someone"@something.com with parenthesis.
- mockupscaledown, on 05/07/2009, -0/+4Very nice! I remember when good stuff like this used to get front paged all the time.
- 83457, on 05/07/2009, -0/+3The whole point is to make it concise. If you write regex in free-spacing mode you can break it up into multiple lines and include comments... http://www.regular-expressions.info/freespacing.ht ...
- chuckDontSurf, on 05/07/2009, -0/+3Shut up.
- greeniemeani, on 05/07/2009, -0/+3Actually very good advice that developers should all know - I am amazed at how many people don't understand "basic" things such as greediness. All some people know is how to match some characters and use the dot operator without knowing what is really going on, which is something you can't get away with in regular expressions. Of course, there is the book "Mastering Regular Expressions"...
- redux2redux, on 05/07/2009, -0/+2I consider it more 'Magical Incantations' than syntax.
- headzoo, on 05/08/2009, -0/+2I think it's high time for Digg to add community feature, that allows each have their own "front page". Such as communities dedicated to programing. Or communities dedicated to lolcats, etc. Sort of like the create a Reddit feature on.. well.. Reddit.
- stix213, on 05/08/2009, -0/+2Regex's seem to me to be just as much an art as a skill :)
- Suzilla, on 05/07/2009, -1/+3Great, useful article! Thanks for posting it!!
- LonelyTylenoL, on 05/07/2009, -0/+2You called?:
http://digg.com/d1qOW0 - geesamba, on 05/07/2009, -0/+2Took me a second. :-)
Dugg. - jgtg32a, on 05/07/2009, -0/+2Regex for emails
^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.(([0-9]{ 1,3})|([a-zA-Z]{2,3})|(aero|coop|info|museum|name))$ - asgardshill, on 05/07/2009, -0/+2Knit 1 Perl 2 ...
- Pxtl, on 05/07/2009, -1/+2Regex is just one tool out of a horde that the average programmer is expected to have in their toolbox. Most of the newer tools were made by people who learned in the Vowel Generation. They were made that way for good reasons - the number of domain-specific tools needed for even simple web-app development is obscene. There's only so much crap you can keep in your head at any given time.
Brevity is no substitute for clarity. - simpleid, on 05/07/2009, -0/+1Using an image of tessellation to depict recursion fails - awesome article though.
- HonoredMule, on 05/07/2009, -0/+1I never knew about named groups before...that's pretty handy, and should be easier to maintain.
- Pxtl, on 05/07/2009, -1/+2I know Regex is Old Magic, and so they had to keep such things in mind when developing it... but would it have killed them to just use friggin' words instead of single-character operators for everything? I mean it all looks like line-noise.
Still, it's a very good guide, since it clearly explains regex features that I have never seen anyone coherently describe before (like the proper use of backreferences). - TheMachine1, on 05/07/2009, -0/+1http://www.youtube.com/watch?v=L7Dw60SVXQ4#t=47s%2 ...
- friendlykiller, on 05/08/2009, -0/+1Great but I can do anything with Regex already... Dugg for the sake of it?
- and386, on 05/08/2009, -0/+1Regular expresssions, awk and sed made me "manytimes" more efficient for sysadmin jobs. And it's also really powerfull as a programmer in other areas. But I always details how the work precisely in the comments, since they are easy to write by trial and errors, but other programmer will find them difficult to read and even hate you if they don't know them.
But eventually this is a huge productivity booster. - headzoo, on 05/08/2009, -0/+1For me, once the light went off, it all made sense. The problem though, and it's one I still deal with, is finding the most simple syntax to accomplish the task. For instance using this:
[\w]
Instead of this:
[A-Za-z0-9_]
That's a simplified example, but I still create regex's that are 30 chars long, just to have some guru do the same in 10. - stix213, on 05/08/2009, -0/+1And FYI, the Linux version is unsupported anymore.... BUT the Windows version runs perfectly fine under WINE with no tweeking or hassles. That's how I always use it.
The amount of time I would spend writing a fairly complicated regex within a perl or python script went from somewhere around 15-20 minutes (including repeated testing to get it right) to around 45 seconds now that I use The Regex Coach and keep a simple regex cheat sheet handy to prototype them first.
So my script writing with multiple regex's has enormously sped up and much more bug free. win win! - johnathanhebert, on 05/08/2009, -0/+1I thought this was a very useful article... maybe one of the most useful programming articles I have seen on digg... I have had to use regular expressions in almost every project of every job using any language... it is definitely a good skill, and this article was very well written.
- cvxdes1, on 05/07/2009, -3/+3I read that as "8 Crucial Steps To _Avoid_ Regular Expressions"
I'd have liked that better. - besher714, on 10/23/2009, -0/+0thx you http://bestforexfree.blogspot.com
http://www.jouryea.com
http://thebestforexfree.blogspot.com - SavageIndustrie, on 07/25/2009, -1/+1what...
- laursen378, on 10/21/2009, -0/+0Regex works excellent when working with ga http://tools.iih.dk/regex/
-
Show 51 - 55 of 55 discussions




What is Digg?
The Digg Toolbar for Firefox lets you Digg, submit content, and keep track of Digg even when you're not on the Digg site. Download the official