Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Code references tool
Message
 
À
13/08/2003 11:02:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00819764
Message ID:
00819799
Vues:
14
Thanks, that got me to where I needed to go.

jfh


>>Hello,
>>Can anyone help me with a regular expression search? I've inherited some old code, and am trying to refactor it, and every table that gets used is used in a specific area:
>>
>>
>>use table in 81
>>use table in 82
>>
>>some may also have tabs at the beginning of the lines.
>>
>>What regular expression search should I use to find these lines? Thanks a lot,
>>
>>jfh
>
>John,
>
>for a specific work area, ie not 0 (note that use ... in 09 would fail)
>
>function do_it()
>	
>	local RegExp, Match, s, i
>	RegExp=  CreateObject('VBScript.RegExp')
>	RegExp.IgnoreCase = TRUE
>	RegExp.Global = TRUE
>	
>	RegExp.Pattern = "use\s+.+\s+in\s+[1-9]\d*"
>	
>	s = [use  ('ppp') in 24]
>	
>	Match = RegExp.Execute(s)
>	
>	do case
>	case empty(Match.Count)
>		&& nothing
>	
>	otherwise
>		for i = 0 to Match.Count-1
>			? Match.Item[i].Value
>		endfor
>	endcase
>
>endfunc
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform