473,395 Members | 1,637 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,395 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 1021

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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.