Macro regexreplace not working

Sathish Kannan asked on June 3, 2016 15:51

Hi,

I just want to replace the space in string with a character "-". Here is my macro in Text/XML transformation

{% DocumentName.ToLower()|(regexreplace)\s(with)- %}

This will not replace space with a character.

Am I doing wrong? Any idea why it is not working.

Correct Answer

Jan Šedo answered on June 3, 2016 17:11

Hi, I would try something like this:

{%DocumentName.ToLower().Replace(" ","-")|(identity)GlobalAdministrator%}

0 votesVote for this answer Unmark Correct answer

Recent Answers


Sathish Kannan answered on June 3, 2016 20:36

Thanks much! it works

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.