Solved

textpad regex replace between 2 quotes

Posted on 2014-12-04
9
322 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 23

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 23

Expert Comment

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

Author Comment

by:jacobJL
ID: 40481640
still didn't work.
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

Author Comment

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

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 23

Expert Comment

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

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

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…
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…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

706 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

19 Experts available now in Live!

Get 1:1 Help Now