[thelist] finding the period after X chars

MATTHEW BERNHARDT bernhardt.7 at osu.edu
Sat Dec 23 00:39:56 CST 2006

Hey all,

In ASP/VBscript, you could use the InStr() function[1].

intCutoffPosition = InStr(200,yourTextVariable,".")
newText = left(yourTextVariable,intCutoffPosition) & " More..."


Hope this helps,

----- Original Message -----
> Hi guys, I'm working on a "more..." style text cut off to use as a 
> short description.
> I'm looking to take the first say, 200 characters or so, but I 
> want it to run out until the next instance of a "." (period) is found, so 
> as to make a complete sentence.
> anyone have a function handy?  php, asp, whatever... i can convert 
> it. just not sure of the technique.

More information about the thelist mailing list