Solved

textpad regex replace between 2 quotes

Posted on 2014-12-04
9
409 Views
Last Modified: 2014-12-04
I am using textpad and need to delete everything within quotes like below.

this is the current code
<OrderDocumentCode Code="00000000" />

this is what i need it to look like.
<OrderDocumentCode Code="" />

There are other quotes in the document so it would need to include the tag OrderDocumentCode

Thanks in advance
0
Comment
Question by:jacobJL
  • 4
  • 4
9 Comments
 
LVL 24

Accepted Solution

by:
NVIT earned 500 total points
ID: 40481520
Find what: (<OrderDocumentCode Code=\")([0-9].+)(\" />)
Replace with: \1\3
0
 

Author Comment

by:jacobJL
ID: 40481614
Thanks for the response. I am getting cannot find regular expression. Please see screen shot
error
0
 
LVL 24

Expert Comment

by:NVIT
ID: 40481624
Move your cursor to the top of the file. Then try again
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

Author Comment

by:jacobJL
ID: 40481640
still didn't work.
0
 

Author Comment

by:jacobJL
ID: 40481646
here is a sample file if that helps
0
 
LVL 24

Expert Comment

by:NVIT
ID: 40481657
Configure, Preferences, Editor. Check "Use POSIX..."
0
 
LVL 34

Expert Comment

by:Dan Craciun
ID: 40481734
Why not simply:
Find what: <OrderDocumentCode Code="\d*" />
Replace with: <OrderDocumentCode Code="" />

You're basically deleting something, so the groups are not really necessary.

HTH,
Dan
0
 

Author Closing Comment

by:jacobJL
ID: 40481765
This solution combined with Configure, Preferences, Editor. Check "Use POSIX..." worked. Thank you so much.
0
 
LVL 24

Expert Comment

by:NVIT
ID: 40481778
@Dan: Thanks for that. I tend to forget the simple things. *sigh*
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
by Batuhan Cetin Regular expression is a language that we use to edit a string or retrieve sub-strings that meets specific rules from a text. A regular expression can be applied to a set of string variables. There are many RegEx engines for u…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

791 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