Forum Discussion
JRahm
Jun 22, 2011Admin
I'm not seeing the issue:
when RULE_INIT {
foreach x [list "1234" "asdf" "wqer!" "asfd/"] {
log local0. "Val: $x"
set res [regexp {^(?:[a-z0-9/+=]+)$} $x]
log local0. "Res: $res"
}
}
Jun 21 22:57:12 local/tmm info tmm[5091]: Rule regexp_test : Val: 1234
Jun 21 22:57:12 local/tmm info tmm[5091]: Rule regexp_test : Res: 1
Jun 21 22:57:12 local/tmm info tmm[5091]: Rule regexp_test : Val: asdf
Jun 21 22:57:12 local/tmm info tmm[5091]: Rule regexp_test : Res: 1
Jun 21 22:57:12 local/tmm info tmm[5091]: Rule regexp_test : Val: wqer!
Jun 21 22:57:12 local/tmm info tmm[5091]: Rule regexp_test : Res: 0
Jun 21 22:57:12 local/tmm info tmm[5091]: Rule regexp_test : Val: asfd/
Jun 21 22:57:12 local/tmm info tmm[5091]: Rule regexp_test : Res: 1
Perhaps the variable in the regexp should be $decoded_val?