This would be pretty easy with CF_REExtract
(see: 
http://www.contentbox.com/claude/customtags/REextract/testREextract.cfm )

For instance, the code below reads a file in which I have a bunch of <LI 
....> ... </LI> tags.
First call CF_RE_Extract to read the file and get a query "tags" in 
which all occurences
of whats in between the <LI tags is found in column pos2.
Then, with a QoQ, get the occurrence for which pos2 is >= position of 
your word,
AND pos3 (the closing tag) <= position of your word + its length.
If the query returns one record, then your word in between some tags.

Ex:

<CF_REextract
    INPUTMODE     = "file"
    INPUT         = "C:\inetsrv\wwwroot\test\aaatest.htm"
    RE1         = "<li[^>]*>"
    RE2         = "</li>"
    OUTPUTMODE     = "query"
    OUTPUT         = "tags"
    >
<CFQUERY DBTYPE="query" NAME="wordInTags">
    SELECT * FROM tags
    WHERE pos2 >= 155 AND pos3 <= 161
</CFQUERY>
<CFIF wordInTags.recordCount GT 0>
    word is contains inside some tag pair
</CFIF>

-- 
_______________________________________
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263281
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to