[HTTPS-Everywhere] Transformations for regex capturing parentheses desirable?
J.B. Nicholson-Owens
jbn at forestfield.org
Tue Aug 9 19:51:31 PDT 2011
I would like to capture a substring and transform it in some way in the
substitution:
http://no.exist/foo/BAR123 -> https://no.exist/foo/bar123
Notice how "bar" becomes lowercase.
So I would like to use the following ruleset:
<ruleset name="no.exist">
<target host="no.exist" />
<rule from="^http://no\.exist/foo/(.*)$"
to="https://no.exist/foo/$1" />
</ruleset>
but somehow specify that $1 should be altered in a specific way:
lowercase it.
Is this desirable in more places than my particular ruleset?
Is there a desirable way to do something like this (I'm thinking another
attribute on the rule element indicating which variable to transform and
how to transform it)?
Thanks for your feedback.
More information about the HTTPS-everywhere
mailing list