Trim specific contains

Dear All,
please help me on urgent basis…
i need to trim the below word in Assign activity.
i need the value as ABC

please help urgently.

1 Like

please help

1 Like

Hi Sumit ,

If you want to remove .exe from the String always , you can use
variable = variable.Replace(".exe","")

1 Like

hi @vishnuvarthanp.
i want to remove <>.exc

the value i want is “ABC” only
please help.

Basically , your string is “”.exe and your final output should only be ABC , correct ?

or can u please let me know how your input string looks like ?

hi @vishnuvarthanp

my string is < and > and .exe
and the final output shoud be ABC

input string is ABC only and remove everything

Use matches activity ,

Configure regular expression , select advanced and give (?<=<)(.*?)(?=>) and save

Pass the input string and create variable for output.

Assign variable = output(0)


sample workflow : Auto Fill Range.xaml (5.3 KB)

1 Like

hi @vishnuvarthanp,

Thank you so much, one question. can i not use trim logic in assign activity
i mean trim code…

for example in sentence :- “Hi How are you ?”
i need “How” only and remove all other words.
so it is not possible to use trim logic and do it ??

i am still in learning phase…

1 Like

You will be able to do it with Trim.

but the Trim works with character array .

You can refer below :slight_smile:

Ok thank you so much :slightly_smiling_face:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.