Angus Leeming <[EMAIL PROTECTED]> writes: | Reading the boost::regex docs: | // All characters are literals except: .|*?+(){}[]^$\ | // These characters are literals when preceded by a "\". > | This sed expression works: > | aleem-> search_expr='. | * ? + ( ) { } [ ] ^ $ \' | aleem-> echo "${search_expr}" | . | * ? + ( ) { } [ ] ^ $ \ | aleem-> echo "${search_expr}" | \ >> sed 's;\([]\\\.\[\|\*\?\+\(\)\{\}\^\$]\);\\\1;g' > | \. \| \* \? \+ \( \) \{ \} \[ \] \^ \$ \\ > | I suppose we can't do the equivalent in 1 line with boost, but I'm sure it | woun't take 40 lines either ;-)
Look at RegEx::Merge it might do what you want. -- Lgb