|
FRM v1.4.2 |
||||||||
PREV SCRIPT NEXT SCRIPT | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | FUNCT | DETAIL: FIELD | CONSTR | FUNCT |
CompiledModule | +--misha_std_re_func_lib
Regular expression functions search and match for WinRunner.
Copyright (c) 2003 Misha Verplak
Supporting regex++ c++ library at www.boost.org: Copyright (c) 1998-2001 Dr John Maddock
Permission is granted to use, modify and redistribute this software provided both copyrights appear in all copies.
This script and dll provides WinRunner with perl-like regular expression search and match functions, to supplement the limited builtin function match() and add GUI properties "label_like" and "id_like" for window recognition.
Known bugs:
Function Summary | |
protected String |
_detail_decode(in detail,
in position,
in nbytes)
|
String |
re_func_init()
initialises the re_func |
String |
re_get_detail(in detail,
in submatch,
out nsubs,
out line,
out position,
out len)
Get the (sub)match position and length from the detail. |
String |
re_get_match(in orig_str,
in detail,
in submatch,
out match_str)
Get the (sub)matched string from the detail. |
extern._int |
re_match(in._string str,
in._string re,
out._int m_pos,
out._int m_len,
inout._string detail)
Match a regular expression to a whole string. |
String |
re_print_detail(in detail)
Print the re match details to the debug window. |
extern._int |
re_search(in._string str,
in._string re,
out._int m_pos,
out._int m_len,
inout._string detail)
Search a string for a regular expression. |
Function Detail |
public extern._int re_match(in._string str, in._string re, out._int m_pos, out._int m_len, inout._string detail)
str
- string to searchre
- regular expressionm_pos
- matched positionm_len
- matched lengthdetail
- detail
public extern._int re_search(in._string str, in._string re, out._int m_pos, out._int m_len, inout._string detail)
str
- string to searchre
- regular expressionm_pos
- matched positionm_len
- matched lengthdetail
- detail
public String re_func_init()
protected String _detail_decode(in detail, in position, in nbytes)
detail
- position
- nbytes
-
public String re_print_detail(in detail)
detail
- (1 byte ) size of this detail, ie. number of submatches + 1
(2 bytes) line number where match occurred, counting from 1
[(2 bytes) position of (sub)match, 0-th submatch is whole match
[(2 bytes) length of (sub)match
[--------- repeated to a maximum of 50 submatches ---]
public String re_get_detail(in detail, in submatch, out nsubs, out line, out position, out len)
detail
- submatch
- nsubs
- line
- position
- len
-
public String re_get_match(in orig_str, in detail, in submatch, out match_str)
orig_str
- detail
- submatch
- match_str
-
|
FRM v1.4.2 |
||||||||
PREV SCRIPT NEXT SCRIPT | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | FUNCT | DETAIL: FIELD | CONSTR | FUNCT |