Solved

textpad regex replace between 2 quotes

Posted on 2014-12-04
9
395 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
ScreenConnect 6.0 Free Trial

At ScreenConnect, partner feedback doesn't fall on deaf ears. We collected partner suggestions off of their virtual wish list and transformed them into one game-changing release: ScreenConnect 6.0. Explore all of the extras and enhancements for yourself!

 

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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Whatever be the reason, if you are working on web development side,  you will need day-today validation codes like email validation, date validation , IP address validation, phone validation on any of the edit page or say at the time of registration…
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,…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

803 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