cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1285
Views
0
Helpful
4
Replies

URI Pattern and REGEX

wilfred malana
Level 1
Level 1

I am trying to reverse the effect of this following following regex;

.office@{User.emailAddress['^.+?@'='']}

This particular regex is from the Jabber provisioning doc. What I am trying to accomplish is to strip out the domain from the email address or leave all characters before the @ sign.

Thanks.

Sent from Cisco Technical Support iPhone App

1 Accepted Solution

Accepted Solutions

Tomonori Taniguchi
Cisco Employee
Cisco Employee

The Regex document available at https://supportforums.cisco.com/docs/DOC-25084 might be handy for you.

BTW, please note if you are using provisioning, please be careful for remove domain for all search rule as provisioning/presence etc. use full URL format for signal handling.

View solution in original post

4 Replies 4

Tomonori Taniguchi
Cisco Employee
Cisco Employee

Simple way to remove domain part from URI but leave “@” using Regex is…,

  • Pattern string: (.+)@.+
  • Pattern behavior: Replace
  • Repalce string: \1\@

wilfred malana
Level 1
Level 1

Thanks. I actually want the @ part removed as well.

Sent from Cisco Technical Support iPhone App

Tomonori Taniguchi
Cisco Employee
Cisco Employee

Simple way to remove domain part from URI including “@” using Regex is…,

  • Pattern string: (.+)@.+
  • Pattern behavior: Replace
  • Repalce string: \1

or if you want to apply this only for SIP domain configured on VCS then…,

  • Pattern string: (.+)@%localdomains%
  • Pattern behavior: Replace
  • Repalce string: \1

Of course you can strip specific domain name from call string including "@".

Assume you want to remove domain name, domain.com, then...,

  • Pattern string: (.+)@domain.com
  • Pattern behavior: Replace
  • Repalce string: \1

Tomonori Taniguchi
Cisco Employee
Cisco Employee

The Regex document available at https://supportforums.cisco.com/docs/DOC-25084 might be handy for you.

BTW, please note if you are using provisioning, please be careful for remove domain for all search rule as provisioning/presence etc. use full URL format for signal handling.