From: paul vudmaska Date: 2003-09-24T10:40:31+09:00 Subject: Re: regular expression >> -------------------- That's because '.' doesn't match newline by default. To get it to, you need to add the /m flag. (You also need to have more than the one line in the string, of course). However, * is greedy, which means that given this text: Here is some [b]bold text[/b], and here is [b]some more bold text[/b] Your regex will match all the way from the first [b] to the last [/b], rather than just to the first [/b]. You can prevent that by using the non-greedy qualifier ?, which goes after the *. Also, I would use %r instead of /.../ just to avoid one of those nasty backslashes. :) ------------ << That great explanation and code worked like a champ. Many thanks! Paul __________________________________ Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software http://sitebuilder.yahoo.com