Search and replace patterns from a string

(imported topic written by sandeepsinghal91)

Is there a way I can search and replace “special characters” from a string value.

For e.g. My input string will be “trying2get#outofthisString!”.

I want to retain only the alpha-numberic characters in the string so that the result is “trying2getoutofthisString” (without the # and the !)

Note: The number of special characters will not be known. Also, I need to do this in relevance only without using the action script. Is it possible ? If yes, please help.

(imported comment written by sandeepsinghal91)

This is what I have tried. Problem is that I am getting multiple substrings and also , I am unable to concatenate them together by extracting the max substring.

q:matches (regex "

0-9a-zA-Z

*") of “trying2get#outofthisString!”

A: trying2get

A: rying2get

A: ying2get

A: ing2get

A: ng2get

A: g2get

A: 2get

A: get

A: et

A: t

A:

A: outofthisString

A: utofthisString

A: tofthisString

A: ofthisString

A: fthisString

A: thisString

A: hisString

A: isString

A: sString

A: String

A: tring

A: ring

A: ing

A: ng

A: g

A:

A:

(imported comment written by sandeepsinghal91)

I think I got it working !

q: concatenation “” of (matches (regex "

0-9a-zA-Z

") of “trying2get#outofthisString!”)

A: trying2getoutofthisString