iRules scan explainer

Give a value and a scan format and see each %d, %s or %[^&] line up against the characters it took, the variable it filled, and exactly why scanning stopped. Explains the -1 result and the Tcl 8.4 quirks. Local, no network.

网络
Try

The command

scan 10:30 %d:%d hours minutes

scan returned 2

2 variables received a value.

The value, as the format consumed it

  1. 10
  2. 01
  3. :2
  4. 33
  5. 04
  • converted
  • literal matched
  • converted (next)

Directive by directive

DirectiveCharactersOutcomeValueVariable
%d
decimal integer
10stored10hours
:
literal text: must match exactly
:matched––
%d
decimal integer
30stored30minutes

Every directive in the format ran.

Variables afterwards

hours
10
minutes
30
API endpointGEThttps://ronutz.com/api/v1/f5-irules-scan-explainerDocumented, not served. Opens the specification.

参考

Appears in these workflows