Derek++ 0 Posted February 4, 2014 Report Share Posted February 4, 2014 Is there a way to use references in the $replace regular expression function? I.e... $replace regular expression(#phone,"([0-9]{3})([0-9]{3})([0-9]{4})","\\1 - \\2 - \\2") Also when I input the above regular expression and click okay it automatically strips out the curly brackets... ([0-9]{3})([0-9]{3})([0-9]{4}) turns into ([0-9]3)([0-9]3)([0-9]4) Quote Link to post Share on other sites
bestmacros 60 Posted February 4, 2014 Report Share Posted February 4, 2014 ubot does not support {4}, try {4,4} Quote Link to post Share on other sites
Derek++ 0 Posted February 4, 2014 Author Report Share Posted February 4, 2014 Thanks. Also the patterns can be reference using $n.. $replace regular expression(#phone,"([0-9]{3})([0-9]{3})([0-9]{4})","($1) $2 - $3") Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.