Reset Method (REGEX)


 

The Reset method is used to reset the associated PL/B REGEX object. This method uses the following format:

 

 

[label]

{object}.Reset

[GIVING {return}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A REGEX object previously declared.

return

Optional. A Numeric Variable that returns a success or fail value.

Flags Affected: EOS, OVER, ZERO

Notes:

  1. If the value returned is zero, the ZERO Condition Flag is set.

  2. The OVER flag is set TRUE if the 'return' variable is too small and cannot contain the 'return' value without being truncated. Otherwise, the OVER flag is set to FALSE.

  3. The EOS flag is always cleared.

  4. The method clears the compiled pattern, and clears the last-match cache.

  5. The {return} value is one when the reset is successfully and zero when the reset failed .

 

Example 1:

 

      RegEx1.Reset Giving N

 

See Also: Method Syntax,REGEX



PL/B Language Reference