View Single Post
  #1  
Old 01-23-2006, 05:27 PM
pjaquiery pjaquiery is online now
Registered User
 
Join Date: 01-19-2003
Location: Dunedin, New Zealand
Posts: 114
Odd JScript behaviour

If I use

["/samplestring/".replace (/[[\\\/]]$/, "")]

as the Value: for a Set Macro step the macro is set to

/samplestring/

and is also shown in the mouseover tool tip with shift down. If I use the immediate pane in the Script Editor to evaluate:

"/samplestring/".replace (/[\\\/]$/, "")

I get:

/samplestring

What am I missing here?

Update: replace (/(\\|\/)$/, "") works around the problem

Last edited by pjaquiery; 01-23-2006 at 05:44 PM.
Reply With Quote