March 2015

Regex for relative file paths

Regular expressions can come in handy when you need to find strings. This Regual expression simply matches relative paths. It’s not perfect, but it gets the job done :) (([^\./\\:*?<>|"]*)(/[^\./\\:*?<>|"]*)*/([^\./\\:*?<>|"]*\.[^\./\\:*?<>|"]+)) I should mention, that this regex is meant for python and also the relative path has to have a file...

How to wrap a javascript function

Recently I wanted to modify a project, to wrap a javascript function, so that I could extend the functionality of that function without breaking the project it was assigned to. After searching the web for a bit, I found this stackoverflow-post, which exactly fits my needs. Works perfectly and I...