[Israel.pm] regex question

Yuval Zaltz Yuval.Zaltz at Tescom.co.il
Sun Jan 25 05:48:17 PST 2004


Hi,
 

I need to parse a VB file that contains Functions and Subs. 

In each subroutine and function I need to identify if the string "On Error" exists

and if not add it.

what is the most efficient way to do this in regex?

Thanks Yuval

 

The file looks like this :

 

.

.

.

Function x

.

On Error ...

.

.

End Function

.

.

Sub y 

.

.

.

End Sub

.

.

.

Function z

.

.

End Function

.

.

 

 




More information about the Perl mailing list