Boost logo

Boost :

From: moshebox_at_[hidden]
Date: 2001-05-17 13:34:51


Well ,john it just wont , this is my RE :

(?:(<\s*LI[^>]*>(?:<[^>]*>)*\s*<\s*A\s+HREF[^>]*>)([^<>]*?)(?:<[^>]*>)
*(<\s*/A.*?>))|(?:(<\s*A\s+HREF[^>]*>)(?:<[^>]*>)*([^<>]*?)(?:<[^>]*>)
*(\s*<\s*/A\s*>(?:<[^>]*>)*<\s*/H.?\s*>))

when I use this format string :

?1\t$2\n:$5\n

it works great , since its a boolean , either A or B

but when I try :

(?1\t$2\n)(?2$5\n)

or :

?1\t$2\n?2$5\n

I get only the first expression , I am probably doing something
wrong , but what ?

the code behind this is :

        while(boost::regex_search(start, end, results, expression,
flags))
        {
        
                std::string str;

                str.assign ( boost::regex_format ( results , fmt ,
boost::format_all ) );

                std::cout << str ;

                start = results[0].second;
        }

I would appreciate your help

thanks

--- In boost_at_y..., John Maddock <John_Maddock_at_c...> wrote:
>
> >I am writing a command line util that takes 3 params , filename ,
> >search expression and format expression.
> >
> ><filename> "(expr1)|(expr2)|(expr3)" "(?1one)(?2two)(?3three)"
> >
> >this wont work , can anyone help me understand why ?
> >
>
> It should work like that: that's certainly the intended usage, and
is the
> usage I use in the HTML example as you rightly point out.
>
>
> - John Maddock
> http://ourworld.compuserve.com/homepages/john_maddock/


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk