简体   繁体   中英

How to find and replace regex in Xcode

I want to add "=" before number 3 and ";" after 3 below line

before:

static NSInteger const  LOAD_USER_PAGE 3
...
...

after:

 static NSInteger const  LOAD_USER_PAGE = 3;

There are lots of lines like this.

How could I do this in XCode?

Press Magnifier icon next to find text area. Select Edit Find Options-> Regex

Then,

Find Text Box

([0-9].$)

Replace Text Box:

= $1;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM