www.lucersoft.com

   
       Home  |   News  |   Downloads  |   Order  |   Contacts

 

 

Main

Home

Site map

Products

LC Backup

LC Copier

HTML Batch Editor

HTML Batch Editor PRO

Tennis 2001

Freeware

Documentation

HTML Batch Editor PRO

LC Basic

Information

Order

Update Policy

Support

Contacts

Links

 
 
 
 

 
 
 
 
 
 
 
 
 

HBEFindRE

HBE specific commands


Syntax

 

result = HBEFindRE(sWhat,nFrom,bCase)


Description:

 

HBEFindRE returns a position in the current processed file where sWhat is found. If a string is not found, function returns 0. The Regular Expressions can be used with this function. HBEFindRE fills a value FOUNDLEN with length of string if string is found. 


Arguments:

 

sWhat - The string to be found in the file.  

nFrom - A position in the file where search begins. The character at nFrom is excluded from the search. A first character in the file has number 1 and so on. But if you want search from the first character (begin of the file) you must set nFrom to 0. This shift make possible using a value returned from this function as parameter to this function again. See example. Parameter nFrom is optional. If this argument is omitted, the function uses 0.

bCase - Determine if searching is case sensitive. Optional - false is default.


Examples:

      ' This script counts number of links
' occurrence in the file.
sWhat = "<\\s*A[^>]*?href.*?>.*?</A>"
count = 0
nWhere = HBEFindRE(sWhat,0,False)
While (nWhere > 0)
  count = count + 1
  nWhere = HBEFindRE(sWhat,nWhere,False)
EndWhile
MsgBox "A file contains " + count + " links."

 


See also:

 

HBEFind, HBEReplace, HBEReplaceAll, HBEReplaceAllRE



 
Last updated: November 2, 2003
Copyright © 2002 Lucersoft

Add to favorites

Back