zontragon
zontragon

Reputation: 820

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?

Upvotes: 1

Views: 468

Answers (1)

zontragon
zontragon

Reputation: 820

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

Then,

Find Text Box

([0-9].$)

Replace Text Box:

= $1;

Upvotes: 2

Related Questions