You've already been given some very good general advice by toolic, but you're still not using it.
As naikonta correctly points out, your first regex doesn't compile, and you don't have any "\\" pattern that you talk about.
Additionally, the beginning of your regex doesn't even make sense -- /^*/ tries to match zero or more of the beginning of the line, which is nonsensical (and gives you warnings if you would only use warnings).
It's not enough to say "it's not working right", you have to say how it's not working right.
Please rewrite your program to use strict and warnings, so that it runs without warnings/errors. Please make your program self-contained (ie. all necessary data is within the program), so that it doesn't depend on an environment which has cleartool, nor an environment which matches yours. Please rephrase your question so that it's crystal clear what you're getting vs. what you want to get:
Here's the data that I'm expecting to get: ... ... ... But in fact, I'm actually getting the following: ... ... ...
In reply to Re: Problem in pattern matching with alternation
by liverpole
in thread Problem in pattern matching with alternation
by perladdict
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |