Jump to content

mass stringreplace


tarre
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...