Today on the #codeigniter IRC channel someone asked about how to match a string that didn’t start with a specific word using a regex. I quickly threw out that, off the top of my head, /^(abc){0}/ should work. Well, surprisingly, it didn’t. Turns out negatively matching words with regular expressions is a little more difficult. [...]
Category Archives: Technology
BarCamp Orlando 2007
August 22, 2007 – 9:43 am
BarCamp is coming to Orlando! I’ve been interested in attending some technical conferences for a while now, so BarCamp is coming just in time. I’m looking forward to some interesting presentations and meeting cool locals in the tech industry. I’ll be representing two companies I’m a part of, MindComet and Statiksoft. Others from both [...]
Natural Order Numerical Sorting
August 20, 2007 – 4:17 pm
I came across an interesting problem today in the CodeIgniter forums. Suppose you have a dataset like this:
1
1.2
1.2.1
1.2.3
1.2.4
2
5
5
5.1
5.7
11
11.1.2
Obviously, the example cited above is sorted, and sorted correctly. Now lets say these values exist in a random order in a database and we want to retrieve them in the same order as above–sorted ascending. The simple [...]
All Rights Reserved. Icons are from