Forum Discussion
Regex in STREAM::expression
STREAM::expression {@sectionbegin.+sectionend@}
when STREAM_MATCHED {
log local0. "matched: [STREAM::match]"
STREAM::replace "[string map {[^A-Za-z][fF][iI][nN][dD][^A-Za-z] *******} [STREAM::match]]"
}
The difficulty I'm having is getting the regex in STREAM::expression to match over line feeds / carriage returns. I've tried [.\r\n]+, [\s\s]+ and various others without success. I can get the match to work in part if I miss out sectionend from my example but do not match on a line feed.
Any suggestions or the correct regex for this would be most appreciated.
Thanks
Darren C
- What_Lies_Bene1
Cirrostratus
FYI, I hit this issue recently. I'm not sure I fully understand what a partial match is but regardless, I doubled the value of the buffer, within the HTTP_RESPONSE event:
when HTTP_RESPONSE { STREAM::max_matchsize 8192 STREAM::enable ... }
Note, the actual response payload that was giving me issues was around 64kB. Considering the issue was intermittent, it's possible the buffer relates to all traffic handled by the Virtual Server, not each connection.
Using the STREAM::max_matchsize command in the STREAM_MATCHED event (as I'd seen suggested elsewhere) doesn't work.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com