Solved

Advanced regular expression, search replace in Visual Studio 2010

Posted on 2011-02-18
3
579 Views
Last Modified: 2012-05-11
I need to replace this:

<xs:element name="artifact" minOccurs="0" nillable="true">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="100"/>
          </xs:restriction>
        </xs:simpleType>
 </xs:element>

Open in new window


With this:

<xs:element name="artifact" minOccurs="0" nillable="true">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:maxLength value="10000000"/>
          </xs:restriction>
        </xs:simpleType>
 </xs:element>

Open in new window


Same thing with increased maxlength attribute.  
0
Comment
Question by:griffja21
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 34929622
Try this:
Find:

{\<xs\:element:b+name="artifact":b+minOccurs=":z":b+nillable="true"\>\n:b+\<xs\:simpleType\>\n:b+\<xs\:restriction:b+base="xs\:string"\>\n:b+\<xs\:maxLength:b+value="}:z


Replace:

\110000000

Open in new window

0
 

Author Closing Comment

by:griffja21
ID: 34935913
Excellent
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 34936037
Glad to help  : )
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…

805 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question