regex - Visual Studio Find and Replace Regular Expressions help -


मैं कुछ असाइनमेंट स्टेटमेंट को प्रतिस्थापित करना चाहूंगा जैसे:

  int someNum = txtSomeNum पाठ; Int anotherNum = txtAnotherNum.Text;  

के साथ

  int someNum = Int32.Parse (txtSomeNum.Text); Int anotherNum = Int32.Parse (txtAnotherNum.Text);  

नियमित अभिव्यक्तियों का उपयोग कर, क्या Visual Studio के ढूँढें और बदलें के साथ ऐसा करने का एक अच्छा तरीका है? मुझे यकीन नहीं है कि नियमित अभिव्यक्ति क्या होगी।

मुझे लगता है कि विज़ुअल स्टूडियो में, आप चिह्नित कर सकते हैं घुंघराले ब्रेसिज़ {txtSomeNum.Text} के साथ भाव। फिर प्रतिस्थापन में, आप इसे \ 1 के साथ देख सकते हैं इसलिए प्रतिस्थापन रेखा int32.Parse (\ 1) ।


अपडेट: के माध्यम से @ Timothy003

वीएस 11 {} \ 1 वाक्यरचना और उपयोग () $ 1

के साथ दूर करता है

Comments

Popular posts from this blog

objective c - iPhone and it's wireless area -

unix - Listing all shared memory segments used by a process on AIX5.3+ -

.net - Self Tracking Entities (STE)'s and partial updates with EF4 and mVC2 -