I've written my own CGI untainting library which uses regular expression variables like qr/^.*$/ to validate incoming data. I'd like to extend this library to also provide automated frontend javascript field validation, preferably by using the same regular expression.
When I print a regular expression variable like the one above, I get (?^:^.*$). This looks to me like the original regular expression wrapped with (?^:.....), is this right?
In other words, is it safe just to remove the (?^: and the ) and send the middle bit through to the frontend javascript, or does this wrapper actually mean something that I should try to understand?
MattLG
In reply to Printing regular expression variable by MattLG
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |