AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Using StringReplace to remove parentheses

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
JamesVan



Joined: 01 Oct 2007
Posts: 17

PostPosted: Fri Dec 21, 2007 10:42 pm    Post subject: Using StringReplace to remove parentheses Reply with quote

Hi again. I'm trying to remove parentheses from a string I'm reading from an environment variable. Essentially, I'm pulling a dynaminc project name, but one project name happens to have open and closed parentheses. Can anyone help me fill in the blank here...

Code:

PRJNAME = "Big Project (Phase 1)"

StringReplace, PRJNAME, PRJNAME, ____________,, All


Desired result for PRJNAME is "BIG Project Phase 1"
Back to top
View user's profile Send private message
Titan



Joined: 11 Aug 2004
Posts: 5068
Location: imaginationland

PostPosted: Fri Dec 21, 2007 10:49 pm    Post subject: Reply with quote

Try:

Code:
StringReplace, PRJNAME, PRJNAME, (, , All
StringReplace, PRJNAME, PRJNAME, ), , All

_________________

RegExReplace("irc.freenode.net/ahk", "^(?=(.(?=[\0-r\[]*((?<=\.).))))(?:[c-\x73]{2,8}(\S))+((2)|\b[^\2-]){2}\D++$", "$u3$1$3$4$2")
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group