Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Answered

How to replace the special character "\" backslash

(0) ShareShare
ReportReport
Posted on by 64

hi ,

I need to replace the special characters only from a string which are there in the windows standard and not spaces .

Eg. Item 001 -> replaced and shown as Item++001 - > over here i am replacing space with "+" character.

I think this is achievable via the streplace and other functions however I think the strreplace does not work for the back slash keyword. "\" .

Can anyone share his view on the same.

Thanks,

VK

  • Verified answer
    Martin Dráb Profile Picture
    231,760 Most Valuable Professional on at
    RE: How to replace the special character "\" backslash

    The problem isn't that strReplace doesn't work with "\". The problem is that "\" isn't a valid string. The value \" the means an escaped " character; the backslash works as the escape character.

    If you want a string containing a backslash, either escape it with another backslash ("\\") or use a verbatim string (@"\").

    By the way, don't assigning the category "Continuous Updates" to threads that aren't related to it. Also, don't add D356FO to every thread title. The whole forum is about D365FO, therefore repeating it in each thread doesn't add any new information.

  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,622 Moderator on at
    RE: How to replace the special character in D365 FO "\" backslash

    Have a look on this blog. the same issue is addressed.

    d365solution.blogspot.com/.../remove-special-character-from-string-in.html

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,884 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,760 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans