web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
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 68

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

I have the same question (0)
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at

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

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

  • Verified answer
    Martin Dráb Profile Picture
    238,740 Most Valuable Professional on at

    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.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 577 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 309

#3
Diego Mancassola Profile Picture

Diego Mancassola 259

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans