<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Hello Satish,<br>
      <br>
      There is no need for regex substitution, since OpenSIPS has lots
      of useful variables. [1]<br>
      <br>
      In your case, you could do:<br>
      <br>
      $var(id) = "sip:" + $rd + ":" + $rp;<br>
      <br>
      [1]: <a class="moz-txt-link-freetext" href="http://www.opensips.org/Documentation/Script-CoreVar-1-12">http://www.opensips.org/Documentation/Script-CoreVar-1-12</a><br>
      <br>
      Best regards,<br>
      <pre class="moz-signature" cols="72">Liviu Chircu
OpenSIPS Developer
<a class="moz-txt-link-freetext" href="http://www.opensips-solutions.com">http://www.opensips-solutions.com</a></pre>
      On 12.09.2014 23:48, Satish Patel wrote:<br>
    </div>
    <blockquote
cite="mid:CAPgF-fo39LkfLAsxMBvNCoX6mFDCqi4qyrW2UMVAuhVGg3wmgQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>Following is $ru and i want to extract following  sip:<a
            moz-do-not-send="true" href="http://sipprovider.com:5060">sipprovider.com:5060</a></div>
        <div><br>
          <a moz-do-not-send="true"
            href="http://sip:123456789@sipprovider.com:5060">sip:123456789@sipprovider.com:5060</a><br>
          <br>
        </div>
        <div>to <br>
          <br>
          sip:<a moz-do-not-send="true"
            href="http://sipprovider.com:5060">sipprovider.com:5060</a><br>
          <br>
        </div>
        <div>I am using following regex but its not working, does
          following make sense? <br>
          <br>
           $var(z) = $ru;<br>
                  $var(z) = "s/[^:@]*@//";<br>
                  xlog("My regex $ru\n");<br>
          <br>
          <br>
          <br>
        </div>
        <div><br>
          <br>
          <br>
        </div>
        <br>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.opensips.org">Users@lists.opensips.org</a>
<a class="moz-txt-link-freetext" href="http://lists.opensips.org/cgi-bin/mailman/listinfo/users">http://lists.opensips.org/cgi-bin/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>