Forum Discussion
gerald_wegener_
Nimbostratus
Jul 11, 2005Regsub always returns a 1 never 0
I've tried running the script that is posted which uses regsub to search for Social Security Numbers in the form xxx-xx-xxxx. I've tried several different permuations of this but can never get anythin...
unRuleY_95363
Jul 12, 2005Historic F5 Account
You can use the Tcl command 'regexp' to match a regular expression and have it return the matched portions.
So, for example,
set card_nums [regexp -all -inline {\d{4}-\d{4}-\d{4}-\d{4}} $payload]
if { $card_nums ne "" } {
log "Found credit card numbers: $card_nums"
}
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
