Jump to content

Recommended Posts

Posted

$string = StringRegExpReplace ( "MyTest(ThisTextGoingByeBye)", "\((\w+)\)", "(Text Is All Up In Here)")

MsgBox(0, "1", $string)

Something like that should do ya.

Posted

how do you replace a string that has "( )" in it with stuff in it.

Like: $string = "Stuff (more stuff)"

i want: $NewString = "Stuff"

$NewSub = "more stuff"

#Include <string.au3>
_StringExplode($sString, $sDelimiter [, $iLimit] )
Posted

$string = StringRegExpReplace ( "MyTest(ThisTex$%&{}tGoingByeBye)", "\((.+)\)", "(Text Is All Up In Here)")

MsgBox(0, "Revised", $string)

Used .+ instead. Should work so long as you don't have newlines between parens?

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
  • Recently Browsing   0 members

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