PsychoSpunk has asked for the wisdom of the Perl Monks concerning the following question:
In this particular javascript, I have a couple REs that test user data, but when it gets processed
var reg1 = /^\d{4}$/; morphs into var reg1 = /^d{4}/;
I tried backslashing the characters that get removed, but those get removed. This is my first stab at TT, so I may be doing bad things. I do need the script variable to be parsed because I have some possible runtime configurations that change in the javascript. But that also brings up my other problem. When I specify that I want to test $script_var.value, I mean that I want $script_var to be replaced with the real value of the variable and when the javascript is run, it will test user_name.value. Instead, the process engine complains that it doesn't know what to do with $script_var.value. Is there a way for me to signify to the parser that I want $script_var placed there so that it still reads user_name.value once it's processed?
ALL HAIL BRAK!!!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Template Toolkit parses out my backslash
by PsychoSpunk (Hermit) on Dec 30, 2000 at 01:21 UTC |