Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can GoFish integrate into VFP IDE like Code References?
Message
De
30/11/2011 09:30:41
 
 
À
30/11/2011 08:59:58
Information générale
Forum:
Visual FoxPro
Catégorie:
VFPX/Sedna
Divers
Thread ID:
01529993
Message ID:
01530011
Vues:
70
>I do not think using regular expressions here will give Mike what he is looking for.
>
>Regular Expressions in Code References search on each line independently, not the entire method/program all at once.
>
>The expression \bdelete\b.+\bsam\b will only find lines that have delete followed by sam on the same line,
>
>I, too, have wanted to be able to looked for modules, rather than lines of code, such as have been requested here, but have never seen anything that would do so.
>


>Regular Expressions in Code References search on each line independently,
Did not know that. But in any case, regex can match across line boundaries. But you have to add the newline chars to the pattern since the dot does not match a newline
	local obj
	local s
	text to s noshow
		delete
		
		c 
		xds
		well same as well
	
	endtext
	
	obj = createobject('VBScript.RegExp')
	obj.multiline = false
	obj.global = true
	obj.IgnoreCase = true
	

	obj.Pattern = '\bdelete\b(.*[\n].*)*\bsame\b'
	
	
	matches = m.obj.Execute(m.s)
	?matches.count
	for each match in m.matches
		?' .'
		?'<' + match.Value +'>', match.length
	endfor
Gregory
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform