Solved

Advanced regular expression, search replace in Visual Studio 2010

Posted on 2011-02-18
3
570 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 74

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
Comment Utility
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
Comment Utility
Excellent
0
 
LVL 74

Expert Comment

by:käµfm³d 👽
Comment Utility
Glad to help  : )
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

In this article, I will show how to use the Ribbon IDs Tool Window to assign the built-in Office icons to a ribbon button.  This tool will help us to find the OfficeImageId that corresponds to our desired built-in Office icon. The tool is part of…
Do you hate spam? I do, and I am willing to bet you do as well. I often wonder, though, "if people hate spam so much, why do they still post their email addresses on the web?" I'm not talking about a plain-text posting here. I am referring to the fa…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now