cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

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
2 Replies
Workflow Hero

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
Workflow Hero

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.

Reply