works, thanks a lot
well I found under windows platform,  pattern  "\\n" can just satisfy my request.
(say, to match exactly a line-break)
anyway, thanks.

On 6/13/06, Anne-Gert Bultena < list-aap@anne-gert.nl> wrote:
> Hi,
>
> This is not really an answer to your question (since I don't know either :-) ), but it might help
> nonetheless. cr/lf are always a bit problematic (is it \n or \r\n, what's in the input string,
> does the engine do platform dependent conversions, etc) and not really important in HTML since
> it's just whitespace. For this reason, instead of matching a line-break, I match whitespace. This
> also handles indentations correctly. Therefore, I'd use the pattern:
>
> "</tr>\s*</table>\s*</td>\s*</tr>\s*</table>\s*</td>\s*</tr>\s*</table>"
>
> good luck,
>
> agb
>
>
> > Can any one tell me how to specify "Multiline" search while using regex?
> >
> >
> > e.g.
> >
> > std::string fb;
> > // fb stores a fragment of html code, multiline;
> > boost::regex
> > pattern("</tr>\r\n</table>\r\n</td>\r\n</tr>\r\n</table>\r\n</td>\r\n</tr>\r\n</table>");
> > boost::smatch res;
> > boost::match_flag_type flags = boost::match_default;
> > std::string::const_iterator s , e;
> > s = fb.begin();
> > e = fb.end();
> > if(boost::regex_search(s, e, res, pattern, flags))
> > {
> >     //process the match.
> > }
> > else
> > {
> >     //I am always here
> > }
> >
> > When I use some other regex tools to check the same target string and match
> > pattern string, I always get the right thing as expected.
> > How can I alter the option of boost::regex_search to satisfy the original
> > request?
> > thanks
> >
> > --
> > This is my Very Signature. Ha, pretty good?
> > _______________________________________________
> > Boost-users mailing list
> > Boost-users@lists.boost.org
> > http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users@lists.boost.org
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>



--
This is my Very Signature. Ha, pretty good?