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 

RegexReplace "$ bug

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






PostPosted: Thu May 22, 2008 5:48 pm    Post subject: RegexReplace "$ bug Reply with quote

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

PostPosted: Thu May 22, 2008 6:02 pm    Post subject: Reply with quote

$ 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
View user's profile Send private message MSN Messenger
Guest






PostPosted: Thu May 22, 2008 7:22 pm    Post subject: Reply with quote

Thanks for the explanation!
Back to top
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