正则表达式
memcpy( rTComDataCU_getDepth1(pcCU) + this_ptr->m_uiAbsIdxInLCU, this_ptr->m_puhDepth, iSizeInUchar );
memcpy( rTComDataCU_getWidth1(pcCU) + this_ptr->m_uiAbsIdxInLCU, this_ptr->m_puhWidth, iSizeInUchar );
memcpy( rTComDataCU_getHeight1(pcCU) + this_ptr->m_uiAbsIdxInLCU, this_ptr->m_puhHeight, iSizeInUchar );
使用rTComDataCU\_.*\( 表达式来搜索,如何替换成TComDataCU_getDepth1(rpcCU),并保证斜体的部分不变呢?
答:使用后向引用,在vs2010中搜索 r{TComDataCU\_.*\(} 替换为 \1r ,\1表示了{ }中的内容。
正则表达式30分钟入门教程 http://deerchao.net/tutorials/regex/regex.htm#grouping
步骤:{TComDataCU\:\:.*\(}[^\)] to \1TComDataCU* this_ptr,
{TComDataCU\:\:.*\(}\) to \1TComDataCU* this_ptr\)
{[^\-\>]}m\_ to \1this_ptr\-\>m_
浙公网安备 33010602011771号