cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Nintex Newbie

Is there a simple way to strip all special characters from a string?

Jump to solution

For purposes of building a URL for a link, I am stripping special characters like comma, period and question mark from a string (created by a user entry):

fn-Replace({TextStart}{ItemProperty:Title}{TextEnd},{textstart},{textend},)

This is working great, but I'm wondering if there is some operator that I can use to refer to all special characters, or if there is an entirely different approach that would deliver the desired result.

Ideas?

0 Kudos
Reply
4 Replies
Highlighted
Automation Master
Automation Master

Re: Is there a simple way to strip all special characters from a string?

Jump to solution

imho, better option would be to use regular expression.

where do you do it, in forms or workflow?

Reply
Highlighted
Nintex Newbie

Re: Is there a simple way to strip all special characters from a string?

Jump to solution

Marian is right. Here is an example using a character class in regex replacing all characters not in class by empty string.

^ Match a single character not present in the list below
[^\w]
\w matches any word character (equal to [a-zA-Z0-9_])
in place of \w You can use a list of all allowed characters.

View solution in original post

Reply
Highlighted
Nintex Newbie

Re: Is there a simple way to strip all special characters from a string?

Jump to solution

Great...How about if i want to keep only "/"

0 Kudos
Reply
Highlighted
Nintex Newbie

Re: Is there a simple way to strip all special characters from a string?

Jump to solution

as \w matches any letter, digit or underscore which is equivalent to [a-zA-Z0-9_] You can use

[^a-zA-Z0-9_/]

0 Kudos
Reply