July 22, 2008

zomg regex

This is probably the most complicated thing I've ever had to work out in my entire life:

/^MK([1-9]|1[0-5]|17|19|77) [0-9]{1,2}[A-Z]{1,2}$/i

Comments

There are currently 32 approved responses to "zomg regex".

  1. Mike Haddad   July 22nd, 2008 [gravatar]

    The hell is that?

  2. Lydia   July 22nd, 2008 [gravatar]

    Hey Jem.
    You probably won't give this much thought, but one of your previous pant award receivers had her website hacked (it was Kate, I believe).

    The website's homepage now looks somewhat demonic, and Kate's visitors are all freaking out and blogging about it.

    'Pretty insane, if you ask me.

  3. Sarah   July 22nd, 2008 [gravatar]

    Wut?

  4. Stephanie   July 22nd, 2008 [gravatar]

    dewd. that looks so fun.

  5. Skye   July 22nd, 2008 [gravatar]

    O_O

    Uhm.

    Can't help you there *hugs*

  6. Kaytlin   July 22nd, 2008 [gravatar]

    Meep.
    I guess that makes me a complete loser for not even having a guess what that even is, apart from it having something to do with coding. Good luck ^^

  7. Dave   July 22nd, 2008 [gravatar]

    umm...65. yeah, 65.

    :/

  8. Aaron   July 22nd, 2008 [gravatar]

    Uhm... lol?

  9. Arwen   July 22nd, 2008 [gravatar]

    Uh, what?

  10. Jabed   July 22nd, 2008 [gravatar]

    Hey Jem.
    You probably won’t give this much thought, but one of your previous pant award receivers had her website hacked (it was Kate, I believe).

    Yeah I just checked her site out, shame really, I kinda liked the site and she had some nice colouring tutorials. Maybe you could help her out Jem since you are a PHP ninja :)

    Good luck with whatever that coding jargon/problem/error that is.

  11. Bubs   July 23rd, 2008 [gravatar]

    What is the regex for? You know I hate them :P

  12. Niki   July 23rd, 2008 [gravatar]

    That looks like a new kind of 1337 talk.

    And that G3R1L1M dude might hax0r us all. Zomg.

  13. Vanesa   July 23rd, 2008 [gravatar]

    I have no idea what that is. Honestly.

    "The website’s homepage now looks somewhat demonic, and Kate’s visitors are all freaking out and blogging about it."

    Oh man! I just blogged about some guy in a blue shirt, and everyone else's is blogging about the hack? I'm so lame. :(

  14. Shannon   July 23rd, 2008 [gravatar]

    I love regular expressions. But my rusty knowledge is making me unsure. D:

  15. Mumblies   July 23rd, 2008 [gravatar]

    /^MK([1-9]|1[0-5]|17|19|77) [0-9]{1,2}[A-Z]{1,2}$/i? Oh yes, of course....Hmmm why does this whooshing sound go off in my head? Beats me Jem

  16. Carly   July 23rd, 2008 [gravatar]

    Pi. The answer is Pi.

    I know this, because Pie is the solution to everything, and in this case, a mathematical/program issue, pi must be the solution! Honest!

    e.g. Mathematical pi vs steak and kidney pie. You can see my logic.

  17. Carly   July 23rd, 2008 [gravatar]

    re: the hacking of outspoken kate. Usually people get hacked for using unsecured, unstable and out of date scripts, having passwords that are easy to guess or giving out their information on-line. There might be other reasons too, those are the only I know...

    I suggest that Kate re uploads everything, and as Jem is always very quick to point out - make sure you are using stable, up-to-date scripts to run your site....

  18. Vera   July 23rd, 2008 [gravatar]

    *goes cross-eyed* I tried... but then I decided that I can always google it :P Then again... since my router at home is pretty much dead I might... NAAAAAAAAAAH! I have some 5 chicklits to catch up with.

    Well, good luck! :-)

  19. Enzo   July 23rd, 2008 [gravatar]

    *is happy that he's only taking trigonometry and algebra 3*

  20. Rachael   July 23rd, 2008 [gravatar]

    /^ = half an emoticon?

    MK = Milton Keynes.

    ([1-9] = Think of a number between 1 and 9?

    Then I get stuck.

  21. Vasili   July 23rd, 2008 [gravatar]

    I know what it could match, but never what it would be used for.

  22. nerd.   July 23rd, 2008 [gravatar]

    Just a hunch, but it looks like a validator for a Milton Keynes post code.

  23. Grant   July 23rd, 2008 [gravatar]

    A php algorithm

  24. Dizzy   July 23rd, 2008 [gravatar]

    O_O I have no idea.

  25. Mumblies   July 23rd, 2008 [gravatar]

    A macro? Dunno, i fick lol

  26. Jem   July 23rd, 2008 [gravatar]

    Virtual cookies to Rachael and nerd; it is indeed a regular expression to match against a set of Milton Keynes postcodes (something I had to make for my course).

  27. Rachael   July 23rd, 2008 [gravatar]

    Woo!

    I used to have an MK postcode a few years ago, actually.

    MK18 FTW. I know MK42 is Bedford... MK8 is in MK somewhere. MK18 is Buckingham and surrounding villages... *geek*

  28. Melissa   July 23rd, 2008 [gravatar]

    And the question was "What is the meaning of life?" I take it?

    Over my head, whoosh.

  29. Jabed   July 24th, 2008 [gravatar]

    Virtual cookies to Rachael and nerd; it is indeed a regular expression to match against a set of Milton Keynes postcodes (something I had to make for my course).

    And now I know that I can sleep in peace knowing what the hell that PHPP jargon was. ^___^

  30. Chien Yee   July 24th, 2008 [gravatar]

    All I knew is that you need to put in MK in front :P

  31. Stepherz   July 24th, 2008 [gravatar]

    That is hopefully something I'll never see besides here....

  32. Poet Blogger   July 25th, 2008 [gravatar]

    I hate regex with a passion, well, kind of. If I can get it to work first try it is awesome, otherwise it is a pain in the butt. Main reason I hate it: the littlest thing can throw it off.

Leave a Reply

No HTML please; first time comments are moderated; comments left without a legitimate first name/nickname and e-mail will be deleted (no, your momma didn't call you "cheap quality wardrobes").

[geek inside avatar]Welcome to the blog of girl geek & php ninja extraordinaire 'Jem'. Web developer, mum and supreme crazy cat lady.. »

---

Post stats

Posted on July 22, 2008 in with 32 comments

---

Related posts

Other posts you might be interested in:

---

Share this post

Talk about this post on your favourite social media website:

tweet this add to stumbleupon add to delicious add to reddit digg this post add to newsvine share on facebook share on friendfeed

---

Subscribe

Like this post? Why not subscribe to the feed?

Knowledge

Pleasure

Archives

See more...