3

I'd like to do string replacement in the pre block of a rule using regular expressions. I know there is a function to do that, but I can't find it. Hints?

I'm thinking something like this:

origStr = "Original-string-has-hyphens";
newStr = origStr.replace(re/-/ /g);

The result being that newStr = "Original string has hyphens".

EDIT: Just realized that I asked a similar question a few months ago, but I never quite got a working answer.

Community
  • 1
  • 1
Steve Nay
  • 2,819
  • 1
  • 30
  • 41

2 Answers2

4

Documentation can be found at http://docs.kynetx.com/docs/Replace I found it using my Kynetx docs search tool http://supersearcher.michaelgrace.org/

Mike Grace
  • 16,636
  • 8
  • 59
  • 79
1

what about origStr.replace("-", " ");

anubhava
  • 761,203
  • 64
  • 569
  • 643