Every time I use regular expressions (or post about them), it makes me think about the classic RegEx post by Jeff Atwood: to compile or not to compile.
BTW: Happy 2013!
–jeroen
Posted by jpluimers on 2013/01/01
Every time I use regular expressions (or post about them), it makes me think about the classic RegEx post by Jeff Atwood: to compile or not to compile.
BTW: Happy 2013!
–jeroen
Posted in .NET, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, RegEx, Software Development | Leave a Comment »
Posted by jpluimers on 2012/07/10
Though the sample question is in C#, it applies to almost any language and framework: for relatively simple checks like IsHex(), you can go the RegEx way, or the compound if-statement way.
Which kind of function do you like most?
I’m not only interested in the percentages, so let me know in the comments why.
–jeroen
PS: if you want to use RegEx in .NET, you can compile them to IL, but be very cautious for the compilation overhead.
Posted in .NET, C#, COBOL, Delphi, Development, JavaScript/ECMAScript, PHP, RegEx, Scripting, Software Development, VB.NET | 8 Comments »
Posted by jpluimers on 2011/02/09
Quite a while ago, user bobince wrote great answer on why not to parse html with RegEx.
Somehow people fail to recognize the brilliance of the answer, and try to simplify it into something like “don’t, use an XML or HTML parser in stead”.
bobince even posted some nice contra-examples that are impossible to parse in RegEx (heck, even most regular HTML and XML parsers have difficulties with them).
So: enjoy the beauty of the answer while it is still locked for editing.
–jeroen
Posted in Development, HTML, RegEx, Software Development, Web Development, XML, XML/XSD | 2 Comments »
Posted by jpluimers on 2011/01/18
In the past I wrote a few blog posts on posting sourcecode in WordPress.
Nick Hodges‘ last Flotsam and Jetsam blog post pointed me to the SyntaxHighlighter JavaScript that is used by WordPress and many other engines/sites.
Their site contains an even more elaborate list of supported languages.
I had the basic list right in my last post, but was missing all the aliases (which often are easier than the longer proper names).
This is the new table adapted from their list: Read the rest of this entry »
Posted in .NET, Batch-Files, C#, CSS, Database Development, Delphi, Delphi for PHP, Development, HTML, HTML5, Java, PowerShell, RegEx, Scripting, SQL, VBS, Web Development, WordPress, XML, XML/XSD, XSD | 5 Comments »
Posted by jpluimers on 2009/09/10
Every now and then I need the ASP.NET RegularExpressionValidator control to validate some user input on a web-page using .NET Regular Expressions (which are very similar to regular expressions used in other languages and frameworks).
Somehow, I have lost loads of time because many of the hits on Google show up high in the results, but do not actually help that much.
So I decided to put up a bunch of links to pages that I think are relevant, or helped me much.
This list is not definitive: please comment when you have links to better information!
Note: this list is current at the instant of the latest edit timestamp: tools might have improved (or disappeared) since then.
Opnions are mine; if you do not agree: please convince me why.
Posted in .NET, ASP.NET, Development, Encoding, JavaScript/ECMAScript, LISP, RegEx, Scripting, Software Development, Unicode, Web Development | Leave a Comment »