Hex Editor
Hex Editor - Binary File Editing Software for Windows

IFileDocument.FindAllRegExp Method

HHD Software - Hex Editor Serial Port Monitor USB Protocol Analyzer Network Monitor
 
 
 
< PreviousTopNext >
Declaration
Automation:
ulong  FindAllRegExp ( [in]   String  RegExp, [in]   uint  SubExpression, [in]   enum RegExpFlags  reFlags, [in]   ulong  StartFrom, [in]   ulong  Size, [in]   IMultiSelection  pFound) ;
Native (C++):
HRESULT  FindAllRegExp ( [in]   BSTR  RegExp, [in]   unsigned long  SubExpression, [in]   enum RegExpFlags  reFlags, [in]   unsigned __int64  StartFrom, [in]   unsigned __int64  Size, [in]   IMultiSelection *  pFound, [out, retval]   unsigned __int64 *  Occurrences) ;
Parameters
RegExp A string that contains a regular expression. A regular expression must by in ECMAScript syntax. SubExpression The number of sub-match to search for. 0 means the entire expression. reFlags Flags that change the behavior of the function. May be one or more of the following values:
Flag Value Description
RegExpTypeANSI 0x00000000 Treat the given range as a stream of single-byte characters. May not be used with RegExpTypeUNICODE flag.
RegExpTypeUNICODE 0x00000001 Treat the given range as a stream of 16-bit unicode characters. May not be used with RegExpTypeANSI
RegExpIgnoreCase 0x00000002 True to ignore case and false to match case.
StartFrom A start offset of the range. Must be a multiple of 2 if RegExpTypeUNICODE flag is specified. Size Range's size. Must be a multiply of 2 if RegExpTypeUNICODE flag is specified. pFoundMultiple Selection object, which contains, on method's return, all located ranges.OccurrencesPointer to a variable to receive a number of occurrences.
Return Value
Automation:A number of occurrencesNative: S_OK or standard OLE error code.
Remarks

Locates all matches of a given regular expression in a given range. You provide the function with an output Multiple Selection object pFound, in which it stores all located ranges. This object is automatically cleared before the operation begins. When the method returns, check the IMultiSelection.Empty property to see if there were any pattern occurrences. Complexity: depends on the range's size and regular expression complexity.

This method is obsolete. Use the IFileDocument.FindAllRegExp2 instead.

< PreviousTopNext >
Copyright © 2012 HHD Software. All rights reserved.