473,385 Members | 2,029 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

regex.replace

AVL
I'm a newbie to regular expressions. I've a requirement where in I need to
search a string and replace a pattern within it....
I want to replace the src attribute of the below string....
" <img src=\"c:\\windows\\windows\\desktop\\imagfes.jpg\" >gfhsdfjsd<img
src="\c:\\windows\\win23\\images/jpg\\>jfdshfjdsh<img
src=\"c:\\win\\winnt\\images.gif."................ ...

My output should be
" <img src=\"d:\\images\\imagfes.jpg\">gfhsdfjsd<img
src="\d:\\images\\images/jpg\\>jfdshfjdsh<img
src=\"d:\\images\\images.gif."...................

can anyone help me out
Feb 27 '06 #1
1 1355
Answer under Framework.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"AVL" wrote:
I'm a newbie to regular expressions. I've a requirement where in I need to
search a string and replace a pattern within it....
I want to replace the src attribute of the below string....
" <img src=\"c:\\windows\\windows\\desktop\\imagfes.jpg\" >gfhsdfjsd<img
src="\c:\\windows\\win23\\images/jpg\\>jfdshfjdsh<img
src=\"c:\\win\\winnt\\images.gif."................ ...

My output should be
" <img src=\"d:\\images\\imagfes.jpg\">gfhsdfjsd<img
src="\d:\\images\\images/jpg\\>jfdshfjdsh<img
src=\"d:\\images\\images.gif."...................

can anyone help me out

Feb 27 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jon Maz | last post by:
Hi All, Am getting frustrated trying to port the following (pretty simple) function to CSharp. The problem is that I'm lousy at Regular Expressions.... //from...
4
by: Jon Maz | last post by:
Hi All, Am getting frustrated trying to port the following (pretty simple) function to CSharp. The problem is that I'm lousy at Regular Expressions.... //from...
4
by: Jon Maz | last post by:
Hi All, Am getting frustrated trying to port the following (pretty simple) function to CSharp. The problem is that I'm lousy at Regular Expressions.... //from...
15
by: morleyc | last post by:
Hi, i would like to remove a number of characters from my string (\t \r \n which are throughout the string), i know regex can do this but i have no idea how. Any pointers much appreciated. Chris
0
by: Karch | last post by:
I have these two methods that are chewing up a ton of CPU time in my application. Does anyone have any suggestions on how to optimize them or rewrite them without Regex? The most time-consuming...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.