Ask a Question related to Dreamweaver AppDev, Design and Development.
-
ceaseanddesist #1
trimming a string either side of a keyword
i want to trim the search results 100 chars EITHER side of the word. BUT
that word might appear as the first word in results or the last in which
case i need to recognise this any only trim left or right acordingly.
e.g.
scenario one word search is "and" which is in the middle
results = " 1000 chars then keyword another 1000 chars"
required trimmed results = " 100 chars then keyword another 100 chars"
scenario two word search is "and" which is at the start
results = " keyword another 1000 chars"
required trimmed results = "keyword another 100 chars"
scenario three word search is "and" which is at the end
results = "1000 chars then keyword"
required trimmed results = "100 chars then keyword"
any suggestions ?
ceaseanddesist Guest
-
check string length server-side
Hi guys, how do i check the string length server-side? I am using the date object to gather the current date. var d = new Date(); var mm... -
trimming a string
I'm generating strings dynamically in my application, and they look something lie this: 0 0 0 435921014 0 0 0 0 What I want to do is trim off... -
Trimming Whitespace
I have a movie that imports an avi file into a cast member through script. The avi file has lots of whitespace around it. Unfortunately, when... -
Trimming Blank Spaces in String
You can use the VB.NET function RTRIM. -- I hope this helps, Steve C. Orr, MCSD http://Steve.Orr.net "Temp" <tempmail@temp.com> wrote in... -
trimming a variable.
I need to trim a variable to have everything after 4 chars in a string. IE: var_temp = 200:16:1234567890 i want everything after 200: to be... -
David Powers #2
Re: trimming a string either side of a keyword
ceaseanddesist wrote:
To get decent help, it's important to say which server-side language> i want to trim the search results 100 chars EITHER side of the word. BUT
> that word might appear as the first word in results or the last in which
> case i need to recognise this any only trim left or right acordingly.
you're using.
--
David Powers
Author, "Foundation PHP 5 for Flash" (friends of ED)
Co-author "PHP Web Development with DW MX 2004" (Apress)
[url]http://computerbookshelf.com[/url]
David Powers Guest



Reply With Quote

