Use regular expressions with Glib

Posted by Sébastien on Stack Overflow See other posts from Stack Overflow or by Sébastien
Published on 2010-03-28T20:42:42Z Indexed on 2010/03/28 20:43 UTC
Read the original article Hit count: 234

Filed under:
|
|

Hello, I would like to find all comment blocks(/*...*/) but the function g_regex_match_full always returns true. Here is the code :

// Create the regex.
start_block_comment_regex = g_regex_new("/\*.*\*/", G_REGEX_OPTIMIZE, 0, &regex_error);

//Search the regex;
if(TRUE == g_regex_match_full(start_block_comment_regex, current_line, -1, 0, 0, &match_info, &regex_error))
{
}

© Stack Overflow or respective owner

Related posts about regex

Related posts about glib