AutoDave Posted November 5, 2005 Posted November 5, 2005 Hello all, I tried the following: $String = "!#+^{}" $String = StringRegExpReplace($String,"([}{])","\1") MsgBox (0,"",$String) I would have expected the following output !#+^{} But instead I get !#+^{{ Is there an explanation? Or is it just a bug (if yes, then I will post this in the bug forum as well) Please advise. Thanks, Dave KeeForm
Moderators SmOke_N Posted November 5, 2005 Moderators Posted November 5, 2005 #include <String.au3> $String = "!#+^{}" $String = StringRegExpReplace($String,"([}{])","\3") MsgBox (0,"",$String) If you're going to use /1 try this one. #include <String.au3> $String = "!#+^{}" $String = StringRegExpReplace($String,"([}])" & "([{])","\1") MsgBox (0,"",$String) I don't know enough about StringRegExpReplace() to say if it's a bug, but the above does work (don't even know if it's correct ... lol) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
AutoDave Posted November 6, 2005 Author Posted November 6, 2005 Thanks for your suggestion, but there seems to be also something wrong:$String = "}}{}"$String = StringRegExpReplace($String,"([}])" & "([{])","\1")MsgBox (0,"",$String)Expected output:}}{}But instead I get:}}}Dave#include <String.au3> $String = "!#+^{}" $String = StringRegExpReplace($String,"([}{])","\3") MsgBox (0,"",$String)If you're going to use /1 try this one.#include <String.au3> $String = "!#+^{}" $String = StringRegExpReplace($String,"([}])" & "([{])","\1") MsgBox (0,"",$String)I don't know enough about StringRegExpReplace() to say if it's a bug, but the above does work (don't even know if it's correct ... lol) KeeForm
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now