Reg Exp Help

P

PerlE

Hi,
I have data in a file in two column formats, which I am trying to search and
match for certain expressions.
Data is as such:
foo1 foo1[ ]
foo2 foo2( )
bar1 bar1( ) ( )
bar2 [ ][ ]
…I want to be able to search for the followings by reading this file:
Please note that the issue is "[ ]" and "( )" and not the words in front of
them.
ignore[m][n]
ignore1(m) [n]
ignore2[m] (n)
ignore3(m) (n)
ignore4[m] ß--------Done, refer below
ignore5(m)[x:y]
ignore6[m][x:y]
ignore7[m](x:y)
ignore8(m)(x:y)
# I have done pattern match for foo1 foo1[ ]; as shown below
if (
/^\s*([\w|\/|\#]+)\s+([\w|\/|\#]+)\s*\[([^\]]+)\]\s*;/ ){
print “ Found [ ] categories”;}
I need similar one-liners for other combination above. it keeps complaining
about using “(“ as delimiter !!!
Thank You.
B
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top