473,231 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,231 software developers and data experts.

Can't find the good search pattern using Regex

Hi,
I have to use Regex in order to parse Visual Basic 6 *.frm files.
I need to get all controls. I have managed to get "normal" controls without problem, but I have some problem with controls nested in themselves.

Example:

Begin VB.Menu M1
Caption = M1"
Begin VB.Menu M1-1
Caption = "M1-1"
Begin VB.Menu M1-1-1
Caption = "M1-1-1"
End
Begin VB.Menu M1-1-2
Caption = "M1-1-2"
End
End
End

Using this regex : "( *)Begin ([\w|\W]+?) ([\w|\W]+?) ?\r\n[\s|\w|\W]+\1End ?\r\n"

Capture :
Begin VB.Menu M1
Caption = M1"
Begin VB.Menu M1-1
Caption = "M1-1"
Begin VB.Menu M1-1-1
Caption = "M1-1-1"
End

I can only capture to the first "End" statement.

Can somebody help me ?

Thanks in advance
Jul 21 '05 #1
0 1015

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: CV | last post by:
How can I match 'n' number of neighbouring words of a pattern using regular expressions? For example, suppose I am looking for the pattern "length xyz cm" in some text. where xyz is a number -...
3
by: HorseGeek | last post by:
I can't find a cookie that my code is writing. The behavior of my webpages indicates that the cookie IS being written SOMEPLACE. However, I can't find it. My client does not want the code going...
3
by: Henrik | last post by:
Hi! Where can i find GOOD documentation for javascript? Is there a GOOD javascript debugger out there, someone who knows?
7
by: John | last post by:
Hi, How do websites like google page through large numbers of records? For example; if I do a search on Google, get 187,000 matches, and go to the 22nd page of the results; I'm sure Google...
0
by: Nakah | last post by:
Hi, I have to use Regex in order to parse Visual Basic 6 *.frm files. I need to get all controls. I have managed to get "normal" controls without problem, but I have some problem with controls...
2
by: PL | last post by:
Hi, I have 2 simple tables, 'Accesses' and 'Partners'. Partners : - Id, primary numeric key - Name of the partner - other informational fields Accesses : - Id, primary numeric key
4
by: Joe | last post by:
I need to do a find/replace on a column name in DataColumn.Expression. Is there a way to do the following using RegEx? MyColumn 10 and Desc = "This is MyColumn desc" I need to replace the...
3
by: js | last post by:
Hi, I've learned basics of Python and want to go to the next step. So I'm looking for good python examples I steal good techniques from. I found Python distribution itself contains some...
9
by: hankssong | last post by:
hi all, I'm wondering how to locate the C header file where defines some struct variable,macro and function. In the MSDN, we can easily solve it by using INDEX search; but how we can do it in the...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.