Raymond,

Thanks for the RESplit UDF, it works great - ALMOST.
The UDF will always ignore the bit of text after the last instance of a
delimeter.

Can you please tell me how to fix this?

Thanks
-Brent

> -----Original Message-----
> From: Raymond Camden [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 23, 2002 6:02 AM
> To: CF-Talk
> Subject: RE: split
>
>
> There is also a RESplit at:
>
> http://www.cflib.org/udf.cfm?ID=424
>
> ==============================================================
> =========
> Raymond Camden, Principal Spectra Compliance Engineer for Macromedia
>
> Email    : [EMAIL PROTECTED]
> Yahoo IM : morpheus
>
> "My ally is the Force, and a powerful ally it is." - Yoda
>
> > -----Original Message-----
> > From: Steve Oliver [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, January 23, 2002 8:49 AM
> > To: CF-Talk
> > Subject: RE: split
> >
> >
> > I made this cfscript that does what your wanting, except it
> > puts it into
> > a query :)
> >
> > You can change it around I'm sure If you'd rather have an array.
> >
> > <cfset string="<P><P><I>blah blah blah<P><P><I>test
> 2<P><P><I>test 3">
> >
> >
> > <cfscript>
> >
> > entries = QueryNew("data");
> > entryloc = 1;
> >
> > for(i=1; entryloc neq 0; i=i+1){
> >
> >     QueryAddRow(entries);
> >
> >     entrystart = find("<P><P><I>",string,entryloc);
> >     entryloc = find("<P><P><I>",string,entrystart+1);
> >
> >     if(entryloc NEQ 0){
> >             entrylen = entryloc - (entrystart + 9);
> >     }else{
> >             entrylen = len(string) - entrystart + 9;
> >     }
> >
> >     entrytext = mid(string,entrystart+9,entrylen);
> >     temp=QuerySetCell(entries,"data",entrytext);
> > }
> > </cfscript>
> >
> > <!--- Output the data --->
> > <cfoutput query="entries">
> > #entries.data#<br>
> > </cfoutput>
> >
> >
> >
> > -----Original Message-----
> > From: Brent Goldman [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, January 22, 2002 10:01 PM
> > To: CF-Talk
> > Subject: split
> >
> >
> > Hi everyone,
> >
> > Is there any equivalent of the Perl function "split" in
> ColdFusion.  I
> > don't
> > think that there is, so are there any custom tags that can do
> > something
> > similar?
> >
> > My problem is that I need to take a string of HTML, and
> parse out the
> > date/time and text values.  Each "entry" in the "journal"
> > string begins
> > with
> > "<P><P><I>", so in Perl all I would need to do is "@entries =
> > split(/<P><P><I>/i, $journal);" to get an array of the
> > entries contained
> > within the journal (except that the first element in the
> > array would be
> > a
> > null string, since there is nothing before the opening
> > <P><P><I> in the
> > journal.
> >
> > Does anyone have a better idea of parsing the entries from
> > the journal,
> > rather than using split, since it is unavailable?
> >
> > Thanks
> > -Brent
> >
> >
> 
______________________________________________________________________
Why Share?
  Dedicated Win 2000 Server � PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionc
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to