Delete Symbols & Blank Spaces at beginning of a sentence

Hello everyone,

I want to format a PDF text by Delete Symbols & Blank Spaces at beginning of a sentence.
How can i do it? Please help me, thank you all.
Ex:

Capture2

Use Trim function to remove empty spaces from the extracted Data.

Thanks
@plmtri.kddi

2 Likes

you can try regular expression like below -

System.Text.RegularExpressions.Regex.Replace(" Hello*Hello’Hello&Hello@Hello Hello", “[^a-zA-Z 0-9-/-]”, “”)
input having spaces and special chars -
out will be similar to this “HelloHelloHelloHelloHello Hello”

1 Like

Thank you @hasib08 and @GBK,
I have try to use Trim but it only remove the special chars which i defined.
Is there any solution for Trim to remove all special chars at beginning of sentence?
Or i have to define all the special chars first?

Use replace and define all the special characters.

Thanks
@plmtri.kddi

1 Like

Thank you @hasib08,
I will use replace and define all the special characters.

1 Like

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