Link to home
Start Free TrialLog in
Avatar of ddrudik
ddrudikFlag for United States of America

asked on

String regex replace (ASP)

I have a large string that contains many substrings formatted like:
<br>03/09/2007  6:34 PM    414619 <A HREF="87.tif">87.tif</A>

All of the data in the substring is dynamic other than the general format of:
<br>date time filesize <A HREF="filename">filename</A>

Where the number of spaces between 'date' and 'filesize' will vary but there will always be one space after 'filesize' and before the '<A HREF=...'

I would like to perform a replace function on the large string that will search for any substrings that begin with '<br>' and end with '</A>' in which their 'filesize' value is greater than a certain value, for example, greater than '4568882'.  The replace function would then replace the entire '<br> ... </A>' substring with "".

Thanks in advance for your help.
ASKER CERTIFIED SOLUTION
Avatar of amit_g
amit_g
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ddrudik

ASKER

Perfect!