" /> Screening Rule and StrReplace - Genesys CTI User Forum

Author Topic: Screening Rule and StrReplace  (Read 3031 times)

Offline rajee

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Screening Rule and StrReplace
« on: June 03, 2013, 10:04:13 AM »
Advertisement
Hi Guys,

For multimedia, I have written a screening rule with regular expression ending with \s*. Classification Server is treating new line(\n) and carriage return(\r) as whitespace characters. Fair enough.

Problem is that I can remove spaces using StrReplace(SomeStr,' ', ''). I have got no idea how to remove new line or carriage return using StrReplace. After struggling for a while, I gave up on Genesys front, and removal was handled in Stored Procedure. All is good now.

Still interested to know how to handle this using Genesys string manipulation.

Any help is much appreciated.

Thank you.

Offline rajee

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: Screening Rule and StrReplace
« Reply #1 on: June 03, 2013, 11:49:25 AM »
Problem with regular expression is I can only use \s for space, tab, newline, carriage return etc. My intention is to find space(s) between numbers. Unfortunately, regular expression is including tab, newline and carriage return as well(which I don't really need it).

Any help with either regular expression for finding just space or strreplace is highly appreciated.

Thank you

Offline rajee

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: Screening Rule and StrReplace
« Reply #2 on: June 03, 2013, 03:24:02 PM »
Hi,

Found a way to include only space(s) excluding other whitespace characters in a regular expression.

Thanks for your time.

Regards,
Rajee

Offline kubikle

  • Full Member
  • ***
  • Posts: 140
  • Karma: 7
Re: Screening Rule and StrReplace
« Reply #3 on: June 03, 2013, 05:15:23 PM »
StrReplace[SomeStr,Char[13], '']

Offline rajee

  • Newbie
  • *
  • Posts: 8
  • Karma: 0
Re: Screening Rule and StrReplace
« Reply #4 on: June 05, 2013, 10:43:05 AM »
@kubikle: Thank you. This is what I used in SQL Stored Procedure. I replaced Char[13] and Char[10]. I never knew it works on Genesys String Manipulation as well. Thanks a lot.
« Last Edit: June 05, 2013, 01:11:58 PM by rajee »