Modify ↓
Opened 14 years ago
Closed 14 years ago
#1669 closed Bug (Fixed)
RegExpReplace strips "\" from replacement string
Reported by: | ResNullius | Owned by: | Jpm |
---|---|---|---|
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 Changed 14 years ago by Jpm
comment:2 Changed 14 years ago by Jpm
- Milestone set to 3.3.7.0
- Owner set to Jpm
- Resolution set to Fixed
- Status changed from new to closed
Fixed by revision [5871] in version: 3.3.7.0
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
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.