Modify ↓
Opened 16 years ago
Closed 16 years ago
#1669 closed Bug (Fixed)
RegExpReplace strips "\" from replacement string
| Reported by: | ResNullius | Owned by: | J-Paul Mesnage |
|---|---|---|---|
| Milestone: | 3.3.7.0 | Component: | AutoIt |
| Version: | 3.3.6.1 | Severity: | None |
| Keywords: | StringRegExpReplace | Cc: |
Description
Win 7 Pro & AutoIt 3.3.6.1
StringRegExpReplace strips backslashes from the replacement string. Doesn't appear to affect other special RegExp control characters in the replacement string
$str = "%CommonProgramFiles%\Microsoft Shared\" MsgBox(0,"","Just to show that other special RegExp characters can be used in the replace string" & @CRLF & @CRLF & StringRegExpReplace($str, "%([^%]*?)%", "(?i)(?:^.*[0-9]$)")) MsgBox(0,"","But the blackslashes get stripped from the replace string here: " & @CRLF & @CRLF & StringRegExpReplace($str, "%([^%]*?)%", "C:\WINDOWS\Some Other Folder"))
Attachments (0)
Change History (2)
comment:1 by , 16 years ago
comment:2 by , 16 years ago
| Milestone: | → 3.3.7.0 |
|---|---|
| Owner: | set to |
| Resolution: | → Fixed |
| Status: | new → closed |
Fixed by revision [5871] in version: 3.3.7.0
Note:
See TracTickets
for help on using tickets.

In fact doc must be updated as back-references use "\". So they must be doubled in the replace string.