Mehboob Alam wrote:
> Funny enough.. I was looking for the same thing, was playing with a screen
> scraping project to crawl through some site.. it looks like this function is
> important enough, that it's part of the language library
>
> http://us.php.net/strip-tags
>
I was basically looking for an equivalent to that function. As I noted
in a previous thread I even tried to dissect the PHP C source code for
hints. What is nice, is that you can include a list of allowable tags if
you wanted to allow simple html formatting such as bold, italic and
underline.
> and also in JavaScript.. this reference might help, it refers to a regex
> pattern
>
> http://www.geekpedia.com/code20_Strip-HTML-using-JavaScript.html
> var strTagStrippedText = strInputCode.replace(/<\/?[^>]+(>|$)/g, “”);
>
I found another page today that has a more complex regexp. See
http://kev.coolcavemen.com/2007/03/ultimate-regular-expression-for-html-tag-parsing-with-php/
> I'm trying to use the JavaScript injection function in the v11 Web Area to
> accomplish what I need..
>
Let us know how that goes? I'm still stuck in pre-v11, but that
capability sounds exciting.
Best,
Brad
> sincerely,
> mehboob alam
>
> To make a bad day worse, spend it wishing for the impossible.
>
>
> --- On Wed, 11/5/08, Brad Perkins <[EMAIL PROTECTED]> wrote:
>
>
>> From: Brad Perkins <[EMAIL PROTECTED]>
>> Subject: Re: [Active4d-dev] strip tags code?
>> To: [EMAIL PROTECTED]
>> Date: Wednesday, November 5, 2008, 6:18 PM
>> Steve Alex wrote:
>>
>>> TextMate has a strip_tags command in the html bundle.
>>>
>> Looking at the
>>
>>> command I see:
>>>
>>> php -r 'echo strip_tags(
>>>
>> file_get_contents("/dev/stdin") );'
>>
>>> Don't know if you can call php in your
>>>
>> environment.
>> Not easily and considering how often I'd need the
>> command that could get
>> expensive.
>>
>> I actually downloaded the PHP source to see if I could
>> dissect their
>> code. I found a bunch of references to strip_tags, but
>> never could find
>> the actual code.
>>
>> Thanks,
>>
>> Brad
>> _______________________________________________
>> Active4D-dev mailing list
>> [email protected]
>> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
>> Archives:
>> http://mailman.aparajitaworld.com/archive/active4d-dev/
>>
> _______________________________________________
> Active4D-dev mailing list
> [email protected]
> http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
> Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/
_______________________________________________
Active4D-dev mailing list
[email protected]
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/