Visual Studio, Find and Replace

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
How to make from punch of lines that looks like:
private string m_HASH;
private int m_STATUS;
private string m_NAME;
private int m_SIZE;
private int m_PERCENT_PROGRESS;
into:
public string HASH { get { return m_HASH; } }
public int STATUS { get { return m_STATUS; } }
public string NAME { get { return m_NAME; } }
public int SIZE { get { return m_SIZE; } }
public int PERCENT_PROGRESS { get { return m_PERCENT_PROGRESS; } }
using visual studio?
use "find and replace" and regex!
Find:
private {[a-zA-Z]+} m_{[a-zA-Z\_]+};
Replace:
public \1 \2 { get { return m_\2; } }