>>> se = SE.SE ('<EAT> "~/[A-Za-z0-9_]+/CHECKEDOUT~==" | /= CHECKEDOUT=') >>> se ('/main/parallel_branch_1/release_branch_1.0/dbg_for_python/CHECKEDOUT') 'dbg_for_python'
If I understand your problem, this might be a solution. It is a stream editor I devised on the impression that it could handle in a simple manner a number of relatively simple problems on this list for which no commensurately simple methodologies seem to exist. I intend to propose it to the group when I finish the doc. Meantime who do I propose it to? Frederic ----- Original Message ----- From: "don" <[EMAIL PROTECTED]> Newsgroups: comp.lang.python To: <python-list@python.org> Sent: Thursday, May 11, 2006 7:39 PM Subject: Reg Ex help > I have a string from a clearcase cleartool ls command. > > /main/parallel_branch_1/release_branch_1.0/dbg_for_python/CHECKEDOUT > from /main/parallel_branch_1/release_branch_1.0/4 > > I want to write a regex that gives me the branch the file was > checkedout on ,in this case - 'dbg_for_python' > > Also if there is a better way than using regex, please let me know. > > Thanks in advance, > Don > > -- > http://mail.python.org/mailman/listinfo/python-list -- http://mail.python.org/mailman/listinfo/python-list