Function Strings (for Visual Basic?)

Syntax highlighting, code folding, brace matching, code indenting, and function list

Function Strings (for Visual Basic?)

Postby SAbboushi » Sun Jun 04, 2006 12:05 am

Hi-

I am having some problems with one of my Function Definition Strings and hope someone can help.

Here are two lines of relevant code:

Public Sub CustomOnEnterControl(ControlID)
Public Sub CustomOnLeaveTab


The relevant Function String:
/Function String 2 = "%[ ^t]++^{Public^}^{Private^} ^{Function^}^{Sub^}^(*^)$"


What I want to display in the Function List:

Public Sub CustomOnEnterControl
Public Sub CustomOnLeaveTab

What I don't know how to do:

How can I strip any parenthetical strings at the end of these lines: "(ControlID)" in my example?

I tried replacing "$" with "[($]" but that caused a mess...

With Regards-
Sam
User avatar
SAbboushi
Basic User
Basic User
 
Posts: 37
Joined: Sun Nov 07, 2004 12:00 am

Re: Function Strings (for Visual Basic?)

Postby Mofi » Sun Jun 04, 2006 1:50 pm

Try this function string:

/Function String 2 = "%[ ^t]++^{Public^}^{Private^} ^{Function^}^{Sub^} +^([0-9A-Za-z_]+^)"

In your function string "^(*^)" selected everything after "Function" or "Sub" till end of line for the function list.

With my " +^([0-9A-Za-z_]+^)" only the word after "Function" or "Sub" is selected for the function list.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4051
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna

Re: Function Strings (for Visual Basic?)

Postby SAbboushi » Sun Jun 04, 2006 9:54 pm

Thanks again for your help Mofi-
With Regards-
Samir
User avatar
SAbboushi
Basic User
Basic User
 
Posts: 37
Joined: Sun Nov 07, 2004 12:00 am


Return to Syntax Highlighting