<div dir="ltr">Hi guys,<div>I am trying to 'search&replace' some patterns in message body but unfortunately with no result (but bunch of errors).</div><div><br></div><div>First of all I am trying to perform regex substitution as one that can be seen at <a href="https://regex101.com/r/vF1kZ7/1">https://regex101.com/r/vF1kZ7/1</a></div><div><br></div><div>Since I have regular expression I am trying to convert it so it will work with `sub_str` function from re.h</div><div><br></div><div>Here is my attempt: <a href="https://gist.github.com/ivanbarlog/1b552b57e89bf4670872#file-test-c-L12">https://gist.github.com/ivanbarlog/1b552b57e89bf4670872#file-test-c-L12</a></div><div><br></div><div>I had quite lot of errors but last error I am getting is that `subst_parser` cannot find separator <a href="https://github.com/kamailio/kamailio/blob/master/re.c#L240">https://github.com/kamailio/kamailio/blob/master/re.c#L240</a></div><div><br></div><div>Since the `struct subst_expr` is not parsed right the next error is segfault in `subst_str` function.</div><div><br></div><div><br></div><div><br></div><div>If someone can explain me how exactly I should use `subst_str` function with my regex I'll be really grateful. Little example code would be also great.</div><div><br></div><div>Thanks in advance</div></div>