web
You’re offline. This is a read only version of the page.
close
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 66

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
    237,801 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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans