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

x
?
Solved

To Mark 2150

Posted on 1998-09-16
1
Medium Priority
?
148 Views
Last Modified: 2010-04-30
Hi,
Yesturday, you showed me how to add text before and after the the actual content.
You also included a neet lil validation for the ".

Todays Question,
using the same code as yesturday, I would need another
validation.
This time, if the parser finds
<img src="the URL">
you delete it.

Thanks.

0
Comment
Question by:idcjavateam
1 Comment
 
LVL 12

Accepted Solution

by:
mark2150 earned 200 total points
ID: 1435231
OPEN source_file FOR INPUT AS #1
OPEN result_file FOR OUTPUT AS #2
quote$ = CHR$( 34 )
marker1$ = "<IMG SRC"
head$ = "Key = Key & " + quote$
tail$ =  quote$ + "& vbcrlf"
DO WHILE NOT EOF(1)
    LINE INPUT #1, text$
'
rescan:
    marker = INSTR( UCASE(text$), marker1$ )
    IF marker > 0 THEN
        marker2 = INSTR(marker, text$, ">" )
        IF marker2 > 0 THEN
            text$ = LEFT( text$, marker - 1 ) + RIGHT( text$, len( text$ ) - marker2 )
            GOTO rescan
            ' =========
        ENDIF
    ENDIF
'
    temp$ = "" 
    FOR index = 1 TO LEN( text$ )
        char$ = MID$( text$, index, 1 )
        temp$ = temp$ + char$
        IF char$ = quote$ then temp$ = temp$ + quote$
    NEXT index
    PRINT #2, head$ + temp$ + tail$
LOOP
CLOSE

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

782 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