Solved

replace

Posted on 2002-07-28
1
140 Views
Last Modified: 2010-03-05
How to replace all occurences of <a href="....">...</a> in my array named: @mdw

I want to have only the text between the <a href>and </a> tags.

Example:

If @mdw contains:

@mdw="<a href="..\test.htm>test</a>,<a href="..\finish.htm>finish</a>

I want it to contain:
@mdw="test,finish"
0
Comment
Question by:michael123199
1 Comment
 
LVL 84

Accepted Solution

by:
ozo earned 50 total points
ID: 7183555
@mdw = ('<a href="..\test.htm">test</a>','<a href="..\finish.htm">finish</a>');
s/<\/?a\b(?:[^>'"]*|(['"]).*?\1)*>//sgi for @mdw;
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

708 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

13 Experts available now in Live!

Get 1:1 Help Now