fixed bug where regex was not being aplied to text