473,323 Members | 1,547 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,323 software developers and data experts.

how to append some string in img src by regularexpression

i have query regarding regular expression

when i am grabbing url content i need to add the img src path as per the specified url

i want to append a text after img src by matching though regular expression ,
like
suppose <img src="top.gif">
i want make it like <img src="www.bastioncoup.com/top.gif">
Jan 10 '07 #1
1 1685
acoder
16,027 Expert Mod 8TB
I think the preg_replace function should do the trick. What do you want to match?
Expand|Select|Wrap|Line Numbers
  1. <img src="top.gif">
or
Expand|Select|Wrap|Line Numbers
  1. <img anything here src="somefileanything here>
and replace somefile with the url + somefile?
Jan 10 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Jonathan Buckland | last post by:
Can someone give me an example how to append data without having to load the complete XML file. Is this possible? Jonathan
8
by: Jeff Griffin | last post by:
I am looking for a good referance on how to validate a string in C#. Specifically have a string which will contain a postal code that may or may not be in the US. I need to check this string to...
1
by: mg | last post by:
Does someone have RegularExpression code (C# WebForm) for server-side validation of Date (mm/dd/yyyy) ... including leap year?
3
by: Arpan | last post by:
Consider the following code which validates a TextBox using RegularExpression: <form id="form1" runat="server"> <asp:TextBox id="txt1" runat="server"/> <asp:RegularExpressionValidator...
1
by: Arpan | last post by:
Using RegularExpression, I want to validate a TextBox so that the TextBox accepts only 8-digit numbers. This can be done with the following RegularExpression: {8} But how do I validate the...
1
by: prp | last post by:
hi all, I have a problem.Suppose I use a regularexpression validator for zip code. An User fill wrong entry in the relevant textbox then regularexpression validator fires.but user did not...
14
by: nishit.gupta | last post by:
Is their any single fuction available in C++ that can determine that a string contains a numeric value. The value cabn be in hex, int, float. i.e. "1256" , "123.566" , "0xffff" , It can also...
12
by: PW | last post by:
Hi, How would I get these values in Access 2003 from "cashregister05012008.xls": cashregister 05012008 Thanks,
4
by: =?Utf-8?B?a3dfdWg5Nw==?= | last post by:
I would like to extract a string that has a single qoutes at the beginning and end like the 'mystring' how would I go about getting the mystring to appear? Thanks in Advance for any help
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.