开发者

find and replace a string using regular expression

开发者 https://www.devze.com 2023-03-15 10:50 出处:网络
i need to find sessionOpen(0, (int *)(&SessionId)); and replace the same 开发者_StackOverflowas follows,

i need to find

sessionOpen(0, (int *)(&SessionId));

and replace the same 开发者_StackOverflowas follows,

sessionOpen(
\#if USE_MULTIPLE_DB
              0,
\#endif
 (int *)(&SessionId));

how can i achieve this using regular expression search and replace method????


replace sessionOpen\((0), \(int \*\)\(&SessionId\)\);

with sessionOpen(\n#if USE_MULTIPLE_DB $1, #endif\n(int *)(&SessionId))

(I assume you want to capture the zero 0)

0

精彩评论

暂无评论...
验证码 换一张
取 消