Forum Discussion
supreme_86715
Jun 13, 2012Nimbostratus
help with iRules Regex scan statement.
I've been trying to scan the following URI inorder to extract specific fields. The URI is
/mapper/time_map/datatype/comtype/37.777125/-122.419644/13/1309/3164.json?v=1°ree_buffer=0.002&callback=jQuery1720814429080274308_1339544764657&_=1339544771741
i need a regex for a scan statement that will extract the data fields "comtype", "37.777125" and "-122.419644"
so far i've tried this, but keep getting "variable is not assigned by any conversion specifiers"
set testuri "/mapper/time_map/datatype/comtype/37.777125/-122.419644/13/1309/3164.json?v=1°ree_buffer=0.002&callback=jQuery1720814429080274308_1339544764657&_=1339544771741"
scan $testuri {%[^/]%[^/]%[^/]%[^/]%[^/]%[^?]} one two three four five six seven eight
any suggestions?
- MiLK_MaNNimbostratusWhy not just use split and then extract the field via lindex?
- hoolioCirrostratusNice work MiLK_MaN. I think the single scan command should be more efficient than split with lindex, etc.
- supreme_86715NimbostratusThank MiLK_MaN this works. Btw what editor/shell are you using the check test the irules?
- MiLK_MaNNimbostratusJust tclsh in a Mint Debian virtual machine on my home ESX server :)
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