Jump to content
Sign in to follow this  
tarre

mass stringreplace

Recommended Posts

tarre

Hey. is it any other way to replace loads of stuff?

the way im doing now is:

$string = "Text with html<br> code that i want to <b>remove</b><br> but cant."

$r1 = StringReplace($string,'<br>','')

$r2 = StringReplace($r1,'<b>','')

$r3 = StringReplace($r,'</b>','')

msgbox(0,'Output',$r3)

in php you can turn str_replace it into a funcion and return it in the end. i tried it on auto-it but failed :/

offtopic: the forum is very slow to loead.

Share this post


Link to post
Share on other sites
monoceres

StringRegExpReplace is perfect in this situation ;)

$text="Text with html<br> code that i want to <b>remove</b><br> but cant."
$text=StringRegExpReplace($text,"(<br>)|(<b>)|(</b>)","")
MsgBox(0,"Without html code",$text)

:D


Broken link? PM me and I'll send you the file!

Share this post


Link to post
Share on other sites
tarre

Big thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×