Content = <ul> <li> <a href = pic_list_MB.ASP? ID = 1 & Page = 2> Star Wallpaper of Music </a> </li> <li> <A href = pic_list_mb.asp? ID = 32 & Page = 1> Music State Star Wallpaper </a> </li </ul>
Want to turn the content of Content into
Content = <ul> <li> <A href = pic_list_1_2.html> Music Star Wallpaper </a> </li> <li> <A href = pic_list_32_1.html> Music Star Wallpaper </a> </a> </a> /li </ul>
The content is read from the database ...
Is there any idea?
Answer
Of course, the simplest is the simplest
Give you a regular function
Function regurl (thestr)
Set regex = new regexp
Regex.ignorecase = true
Regex.pattern = pic_list_mb/.sp/? ID = (/d*)/& page = (/d*)
Regurl = RegEx.replace (thestr, PIC_LIST_ $ 1_ $ 2.html)
End function
You can call it directly like this
content = regurl (content)
Or you can also use a stupid method to extract, but it is not recommended