in reply to regular expression
You need the s modifier, i.e. /.../s, so that '.' in your regular expression also matches \n
thanks jethro it works now!