/(Regular Expressions|Grossness)/

  • Nov 29, 2012
  • 0 Comments

This week I ventured into the world of regular expressions. For anyone who hasn't had this pleasure/misfortune, regular expressions are basically javascript's way of writing generalized strings, eg. "find all the words that start with either A or B and somewhere contain a C". I'm using these to find all of the hyperlinks/urls to LG worlds, challenges, and users that people put in comments. I have it finding all the urls that are formatted such that they might redirect to an actual world/challenge/user page. I'm still working on sending this information back through ruby/rails to check if these are real objects in our database, but hopefully that will be working soon. Once it is, I'm planning to convert these into shared Links and figure out how to pass them to a special partial, to be displayed separately, or at least differently from the containing comment.

Comments

  • No comments yet

Log In or Sign Up to leave a comment.