Hi, I am using the regex library and using the following expression. But it seems it is wrong. Since there is no compilation or linker error but runtime error. the expression is boost::regex e("*\\.exe") and the call to regex_match is if (boost::regex_match((*dir_itr).native_file_string(),e)) But as soon as I use * it throws some runtime error. If I remove "\\." and "*". It works fine. Does anyone have such issue. Thanks with best regards, Vikrant
On Wednesday, February 4, 2004, at 06:54 AM, Vikrant Rathore wrote:
Hi,
I am using the regex library and using the following expression. But it seems it is wrong. Since there is no compilation or linker error but runtime error.
the expression is
boost::regex e("*\\.exe")
Try ".*\\.exe" Regex's "*" matches any number of the _previous expression_. --rich
Thanks all for your help. It indeed did work. On 4 Feb 2004 at 8:36, Rich Johnson wrote:
On Wednesday, February 4, 2004, at 06:54 AM, Vikrant Rathore wrote:
Hi,
I am using the regex library and using the following expression. But it seems it is wrong. Since there is no compilation or linker error but runtime error.
the expression is
boost::regex e("*\\.exe")
Try ".*\\.exe"
Regex's "*" matches any number of the _previous expression_.
--rich
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Hi,
I am using the regex library and using the following expression. But it seems it is wrong. Since there is no compilation or linker error but runtime error.
the expression is
boost::regex e("*\\.exe")
I think that you should try: boost::regex e(".*\\.exe") The '*' must follow a valid regular expresion.
participants (3)
-
Raul Huertas Diaz
-
Rich Johnson
-
Vikrant Rathore