Trim function not working

Hi,

I am having trouble trying to use Trim on a String.
The string is created from a web data scrapping.
There is only one space remaining at the end of the string, but Trim refuse to remove it.

Here is my Watch Tab:

As you can see:

  • Trim don’t work, but replacing all whitespace works.
  • The remaining whitespace seems to be a “real” whitespaces (not a “non-breaking”)
  • Even copy pasting directly the string and appending Trim to it dont work

Anyone have any idea where the problem might be coming from?

Thank you.

Hi,
Can you show what innerHtml text looks like after examining an element in a browser page? It should be different from what is in aaname.

Hi, thanks for your answer.

I am not sure what you mean. Here is what I see in UI Explorer:


I forgot to mention that I’m scrapping an entire html table via the Data Scraping Wizard

grafik

Sorry but i Cant rejust the problem.

maybe still try with TrimEnd?

Hi all,
Thank you very much for all for your answers.

I may have found what is happening on my String:

  • The Length should be 24 but is 25.
  • It seems that there is a mysterious character in front of the remaining whitespace that cant be selected with mouse.
  • When I delete it, the whitespace is still there but Trim works.

Do you know what could be this character ?

EDIT:

Somehow it seems to be a question mark.

replacedStr=Str.Replace( Split(Str,“)”).last.ToString , “” )