 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
JamesVan
Joined: 01 Oct 2007 Posts: 17
|
Posted: Fri Dec 21, 2007 10:42 pm Post subject: Using StringReplace to remove parentheses |
|
|
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 |
|
 |
Titan
Joined: 11 Aug 2004 Posts: 5068 Location: imaginationland
|
Posted: Fri Dec 21, 2007 10:49 pm Post subject: |
|
|
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 |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|