Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

replace

Posted on 2002-07-28
1
Medium Priority
?
151 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 85

Accepted Solution

by:
ozo earned 200 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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…
Six Sigma Control Plans

963 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