?
Solved

Advanced regular expression, search replace in Visual Studio 2010

Posted on 2011-02-18
3
Medium Priority
?
605 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 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

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

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

As most anyone who uses or has come across them can attest to, regular expressions (regex) are a complicated bit of magic. Packed so succinctly within their cryptic syntax lies a great deal of power. It's not the "take over the world" kind of power,…
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
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…
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…

777 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