| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Thu May 22, 2008 5:48 pm Post subject: RegexReplace "$ bug |
|
|
I think this may be a bug... can anyone tell me why this code removes the "$5" from the result?
| Code: | r = test
x = test $100 total
y = I got $50 out of
x := RegexReplace(x, r, y)
msgbox % x |
Result:
| Code: | | I got 0 out of $100 total |
This happens whenever there is a "$" followed by a number. It seems that a "$" followed by any other character works fine.
I am using version 1.0.47.03. Thanks! |
|
| Back to top |
|
 |
Superfraggle
Joined: 02 Nov 2004 Posts: 902 Location: London, UK
|
Posted: Thu May 22, 2008 6:02 pm Post subject: |
|
|
$ followed by any other number refers to a back reference.
Since there is no 5th back reference it removes the $5 from the string.
This is working as designed. _________________ Steve F AKA Superfraggle
http://r.yuwie.com/superfraggle |
|
| Back to top |
|
 |
Guest
|
Posted: Thu May 22, 2008 7:22 pm Post subject: |
|
|
| Thanks for the explanation! |
|
| Back to top |
|
 |
|