Remove first or last element of a string

I have a string “1 Professional Services” which I want to remove “1” from it and output = “Professional Services”

I have a string “Professional Services 1” which I want to remove “1” from it and output = “Professional Services”

Help

Hey @Amr_Nweery

image

image

Workflow -

string regex.zip (43.9 KB)

Hope this helps you
Cheers,

Hi @Amr_Nweery

You can use the following RegEx pattern to achieve the expected result:

[a-zA-Z\s]+

Output:

image

image

Hope this helps,
Best Regards.

Hi,

FYI, another approach:

TrimStart

"1 Professional Services".TrimStart("1 ".ToCharArray)

TrimEnd

"Professional Services 1".TrimEnd("1 ".ToCharArray)

Regards,

1 Like

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