removed commented code
fixed regexes for ios platform in hook