Solved

Advanced regular expression, search replace in Visual Studio 2010

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

zlib is a free compression library (a DLL) on which the popular gzip utility is built.  In this article, we'll see how to use the zlib functions to compress and decompress data in memory; that is, without needing to use a temporary file.  We'll be c…
This article surveys and compares options for encoding and decoding base64 data.  It includes source code in C++ as well as examples of how to use standard Windows API functions for these tasks. We'll look at the algorithms — how encoding and decodi…
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…

695 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