Forum Discussion
TMaCEvans_92750
Aug 16, 2011Nimbostratus
converting regex to irule
i'm wondering if its possible to carry out the below rules below in an irule?
article page: match url="^([A-Za-z\-]+)/([A-Za-z\-0-9.]+)/([0-9]+)(/)" url="Full_Article.aspx?art_id={R:3}"
category archive page: match url="^Archive/([A-Za-z\-0-9.]+)/([0-9]+)/([0-9]+)(/)" url="archive.aspx?cat_id={R:2}&pg={R:3}
date archive page: match url="^Archive/([0-9]+)\-([0-9]+)/([0-9]+)(/)" url="archive.aspx?mon={R:1}&yr={R:2}&pg={R:3}
news homepage: match url="^/" url="Home.aspx"
rss page: match url="^Rss" url="RSS.aspx"
- hooleylistCirrostratusCan you give a few sample strings for each case? We should be able to adapt this to iRule code using scan or string commands instead of regexes for better performance.
- Colin_Walker_12Historic F5 AccountThe answer is definitely yes. As Aaron indicated, using something other than regular expressions will likely be vastly superior performance wise. Regular expressions are powerful and when necessary iRules can certainly allow you to use them, but we tend to recommend them as a last option.
- TMaCEvans_92750NimbostratusI've managed to get all the rules working accept for this one
- TMaCEvans_92750Nimbostratusdouble post
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