Reputation: 19
I have a problem on VS Code.
I want to delete just column attribute for 200 files.
How to delete them on one click?
I tried (.+?)[Column*/]
on Regex Expression.
[Column("JOBSTOP")] public DateTime JobStop { get; set; }
[Column("JOBSTOPAVG")] public DateTime JobStopAvg { get; set; }
[Column("JOBSTOPPRJ")] public DateTime JobStopRj { get; set; }
I expect the output of [Column("JOBSTOP")] public DateTime JobStop { get; set; }
to be public DateTime JobStop { get; set; }
.
There are many files like this.
Upvotes: 1
Views: 43
Reputation: 24
Upvotes: 1
Reputation: 627468
You may use
\[Column\("[^"]*"\)]\s*
If you do not care to check for double quotes use a shorter expression:
\[Column\([^)]*\)]\s*
Details
\[Column\("
- [Column("
string[^"]*
- 0+ chars other than "
([^)]*
matches 0 or more chars other than )
)"\)]
- a ")]
substring\s*
- 0 or more whitespaces.Demo
Upvotes: 0