Forum Discussion
msmithie_292078
Nimbostratus
Nov 14, 2017Regex on STREAM expression
Hi,
I'm trying perform a regex on a STREAM::expression, is something like this possible?
{@EXT.1920x1080.(.|\n)*@@}
Here is an example of the text:
EXT-X-STREAM-INF:BANDWIDTH=4950570,RESOLUTION=1280x720,CODECS="avc1.4D401F,mp4a.40.2" manifest_7.m3u8 EXT-X-STREAM-INF:BANDWIDTH=6600279,RESOLUTION=1920x1080,CODECS="avc1.64002A,mp4a.40.2" manifest_8.m3u8
When I run the regex in notepad++ it selects the desired text, but doesn't seem to work on the F5.
Here is my irule:
when HTTP_REQUEST {
STREAM::disable
HTTP::header remove "Accept-Encoding"
}
when HTTP_RESPONSE {
Check if response type is text
if {[HTTP::header value Content-Type] contains "application"}{
STREAM::expression {@EXT.*1920x1080.*(.|\n)*@@}
Enable the stream filter for this response only
STREAM::enable
}
}
Any help appreciated.
Mark
No RepliesBe the first to reply
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects