views:

327

answers:

1

I have a xml text file opened in VS2005 IDE.

It has 4 mocked up lines:

<mc id="dog" name="mydogBob"/>
<mc id="cat" name="katie"/>
<mc id="turtle" name="slow"/>
<mc id="fish" name="happy"/>

How do I use VS2005 Find/Replace function with regular expression to replace words and make the final result like:

dog
cat
turtle
fish

Thank you so much

-Simon

+5  A: 

Find What:

^.*id="{.*}" .*$

Replace With:

\1

In Find options check Use and select Regular Expressions from the dropdown.

CMS
that would return: `dog" name="mydogBob` as the first result.
blesh
`^.*id="([^"]+)" .*$` try that.
blesh