Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can GoFish integrate into VFP IDE like Code References?
Message
From
30/11/2011 09:30:41
 
 
To
30/11/2011 08:59:58
General information
Forum:
Visual FoxPro
Category:
VFPX/Sedna
Miscellaneous
Thread ID:
01529993
Message ID:
01530011
Views:
75
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform