Jonathan Waller's Blog
| The right tool for the job |
Mon, 05 Jul 2010 13:22:42 GMT |
My most recent program includes this regular expression:
[|.!]\s*((((([A-Za-z]+)|([A-Za-z]+[-'][A-Za-z]+))|([0-9]+(st|nd|rd|th)*))|((("(([A-Za-z]+)|([A-Za-z]+[-'][A-Za-z]+))")|('(([A-Za-z]+)|([A-Za-z]+[-'][A-Za-z]+))'))|(("([0-9]+(st|nd|rd|th)*)")|('([0-9]+(st|nd|rd|th)*)')))|(("(((([A-Za-z]+)|([A-Za-z]+[-'][A-Za-z]+))|([0-9]+(st|nd|rd|th)*))( ((([A-Za-z]+)|([A-Za-z]+[-'][A-Za-z]+))|([0-9]+(st|nd|rd|th)*)))+)")|('(((([A-Za-z]+)|([A-Za-z]+[-'][A-Za-z]+))|([0-9]+(st|nd|rd|th)*))( ((([A-Za-z]+)|([A-Za-z]+[-'][A-Za-z]+))|([0-9]+(st|nd|rd|th)*)))+)')))(,? (((([A-Za-z]+)|([A-Za-z]+[-'][A-Za-z]+))|([0-9]+(st|nd|rd|th)*))|((("(([A-Za-z]+)|([A-Za-z]+[-'][A-Za-z]+))")|('(([A-Za-z]+)|([A-Za-z]+[-'][A-Za-z]+))'))|(("([0-9]+(st|nd|rd|th)*)")|('([0-9]+(st|nd|rd|th)*)')))|(("(((([A-Za-z]+)|([A-Za-z]+[-'][A-Za-z]+))|([0-9]+(st|nd|rd|th)*))( ((([A-Za-z]+)|([A-Za-z]+[-'][A-Za-z]+))|([0-9]+(st|nd|rd|th)*)))+)")|('(((([A-Za-z]+)|([A-Za-z]+[-'][A-Za-z]+))|([0-9]+(st|nd|rd|th)*))( ((([A-Za-z]+)|([A-Za-z]+[-'][A-Za-z]+))|([0-9]+(st|nd|rd|th)*)))+)'))))+\.)
Geek brownie points if you can figure out what it does. :) |
| Mood: chocolate-filled |
View comments |
| The future |
Tue, 15 Jun 2010 09:04:56 GMT |
| Where do you see me in 10 years? |
Mood: happy |
View comments |
| 12.8 Km |
Fri, 02 Apr 2010 03:07:58 GMT |
| Every moment is another chance. |
Mood: happy |
View comments |
| An English question... |
Wed, 24 Mar 2010 03:27:21 GMT |
How should the sentences below be rewritten to have the grammar make sense?
Is your name "Jonathan Waller"?
No? Well glance below at the lucky people who are.
[Follows is a list of people named "Jonathan Waller"] |
Mood: happy |
View comments |
| My most recent purchase |
Sat, 13 Mar 2010 00:15:50 GMT |
|
|
View comments |
| Thought for the day |
Sun, 07 Mar 2010 14:50:17 GMT |
| Real happiness is loving what you do. |
|
View comments |