Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. String Manipulation - Replace function

String Manipulation - Replace function

Scheduled Pinned Locked Moved C#
helpcsharptestingbeta-testingtutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    omlac
    wrote on last edited by
    #1

    Good day all I have got a string in c# as shown below, and i want to find and replace a substring within the string with another string. here is the original string: mystring = "Testing Image Embading
    \r\n![]()
    \r\nEmage Embabeded here\r\n" my string replace function: mystring = mystring.Replace("src=\"/Web%20Cleint"/"Home%20Page"/"Images"/"Stop.png\","src=cid:companylogo"); My problem: is im have difficulties in handling escape characters, i keep getting the error "; missing" or newline in constant. does anyone know i can solve this or help me with links on how to solve this. Please note im working with web application.

    G 1 Reply Last reply
    0
    • O omlac

      Good day all I have got a string in c# as shown below, and i want to find and replace a substring within the string with another string. here is the original string: mystring = "Testing Image Embading
      \r\n![]()
      \r\nEmage Embabeded here\r\n" my string replace function: mystring = mystring.Replace("src=\"/Web%20Cleint"/"Home%20Page"/"Images"/"Stop.png\","src=cid:companylogo"); My problem: is im have difficulties in handling escape characters, i keep getting the error "; missing" or newline in constant. does anyone know i can solve this or help me with links on how to solve this. Please note im working with web application.

      G Offline
      G Offline
      Giorgi Dalakishvili
      wrote on last edited by
      #2

      @

      Giorgi Dalakishvili #region signature my articles My blog[^] #endregion

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups