J
John Black
Hi,
I need to match the following pattern with a file,
begin <some string>
<some thing this line>
<some thing this line>
......
end
I check the web, it says I should use pattern modifier s & m, so I
write it this way,
while (<MyFile>){
if (/^(\s*)begin(.*)^(\s*)end/smi){
... call my function...
}
}
But it never matches the pattern, do you see the problem?
Thanks!
I need to match the following pattern with a file,
begin <some string>
<some thing this line>
<some thing this line>
......
end
I check the web, it says I should use pattern modifier s & m, so I
write it this way,
while (<MyFile>){
if (/^(\s*)begin(.*)^(\s*)end/smi){
... call my function...
}
}
But it never matches the pattern, do you see the problem?
Thanks!