24 Apr
2006
24 Apr
'06
7:09 p.m.
Hi, I would like to implement matching of SQL-LIKE clauses by Boost regex. I need to convert strings like "HEL_LO%" into something regex("HEL.LO.*"). As the LIKE-string might contain characters like '.', '+* etc these need to be escaped: "HE+LO%" -> regex("HE\+LO.*"). Another example are shell globs where * and ? take the place of % and _. I have not found an obvious and easy way (besides doing the replacing and escaping by hand) of how to do that using Boost.Regex. Is there any support for this problem present in Boost? Thank you and best regards Christoph