/*
- * Copyright (C) 2005-2008 Atsushi Konno All rights reserved.
+ * Copyright (C) 2005-2011 Atsushi Konno All rights reserved.
* Copyright (C) 2005 QSDN,Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
*/
#include <apr.h>
#include <ap_config.h>
-#include <ap_regex.h>
#include <apr_strings.h>
#include <httpd.h>
+#include "mod_chxj.h"
+
#include "chxj_preg_replace.h"
+
static inline char *
s_init_pattern(apr_pool_t *p, const char *old)
{
{
char *new_pat;
new_pat = s_init_pattern(p, pattern);
-fprintf(stderr, "pattern string=[%s]\n", new_pat);
return ap_pregcomp(p, new_pat, AP_REG_EXTENDED|AP_REG_ICASE);
}
/* Match */
char *one = ap_pregsub(p, "$1", str, regexp->re_nsub + 1, match);
char *three = ap_pregsub(p, "$3", str, regexp->re_nsub + 1, match);
-fprintf(stderr, "MATCH\n");
if (strlen(replacement)) {
return apr_pstrcat(p, one, replacement, three, NULL);
}
return apr_pstrcat(p, one, three, NULL);
}
-fprintf(stderr, "NOT MATCH \n");
/* Not Match */
return NULL;
}