NAME
Apache::StrReplace - Filter between string replace
SYNOPSIS
Apache httpd.conf
PerlModule Apache::StrReplace
PerlSetVar StrReplaceSearch replace_before_string
PerlSetVar StrReplaceReplace replace_after_string
PerlSetVar StrReplaceOption replace_option
PerlOutputFilterHandler Apache::StrReplace
DESCRIPTION
StrReplaceSearch ... search strings.
StrReplaceReplace ... replace strings.
StrReplaceOption ... regexp options. ( default "g" )
run code. eval '$f->ctx->{body}=~s/$search/'."$replace/$option;";
EXAMPLE
simple replace.
PerlModule Apache::StrReplace
PerlSetVar StrReplaceSearch hoge
PerlSetVar StrReplaceReplace foo
PerlOutputFilterHandler Apache::StrReplace
The numbered match variables.
PerlModule Apache::StrReplace
PerlSetVar StrReplaceSearch "([a-z]*).example.com"
PerlSetVar StrReplaceReplace "dev.$1.example.com"
PerlOutputFilterHandler Apache::StrReplace
Perl code.
PerlModule Apache::StrReplace
PerlSetVar StrReplaceSearch "<taxes>(\d+)</taxes>"
PerlSetVar StrReplaceReplace "int( $1 * 1.05 )"
PerlSetVar StrReplaceOption "eg"
PerlOutputFilterHandler Apache::StrReplace
SEE ALSO
AUTHOR
Shinichiro Aska, <cpan@aska-tech.jp>
COPYRIGHT AND LICENSE
Copyright (C) 2007 by Shinichiro Aska
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available.