If the number you want is always preceded by "House Number: " then this
should work...

<cfif ListFirst(listElement, ":") EQ "House Number">
    <cfset theNumberYouWant = Trim(ListLast(listElement, ":"))>
</cfif>

Also, I'm not sure it's a problem, but you should change one of the i
variables to another name, it made me look twice so no doubt others will
too.

Hope that helps, let us know how you get on.

Ade
  -----Original Message-----
  From: Scott Adams [mailto:[EMAIL PROTECTED]
  Sent: 28 July 2004 13:49
  To: CF-Newbie
  Subject: Plucking out some text from a <cfloop> how to

  I need some help on this. I'm reading in a file and dumping it to a
variable "i" and then displaying it to the screen using a cfloop

  <cfloop index=i List="#i#">
    #i#
  </cfloop>

  The file being read in looks something like this

  Name: Satan
  Company: MikeRoweSoft
  Address: 666 Hell Crescent
  House Number: 666

  From the above loop how can I "pluck" out the house number "666" or
whatever it might be and dump it to another variable for future referencing?

  varNew = 666

  --
  _______________________________________________
  Find what you are looking for with the Lycos Yellow Pages

http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp
?SRC="" Remove Footer Here-->
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to