Print Page | Close Window

A weirdo regular expression problem

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=7405
Printed Date: 01 April 2026 at 1:00am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: A weirdo regular expression problem
Posted By: Stevo
Subject: A weirdo regular expression problem
Date Posted: 19 November 2003 at 8:24pm

Hi there,

I have been having this very strange problem using regular expressions - basically, i have been using it to replace paths in standard HTML files to change relative paths to absolute paths.  This is now working great for hpyerlinks, and works fine for images, with one exception: everytime the image tag is updated, if there were spaces before or after the <img ...> tag, these turn into question marks, and show up on the HTML page.

Basically, this page reads the whole HTML output stream into a variable, and then uses regular expressions to make some modifications - including the image and hyper paths (a lot like you would use to remove certain areas for 'print friendly' pages).  If anyone has any idea at all what might help me around this, that would be most appreciated... I have tried reading in any space characters either side as part of the regular expression pattern, but no success.

Many thanks for any help,
Regards,
Steve




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net