Re: help with strings!
| From: | Arjun Saha | Date: | Tue, 05 Sep 2000 23:05:53 +0000 |
| Subject: | Re: help with strings! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-15371@lists.php.net to get a copy of this message | ||
Hey "The Captain",
Thanx so much for that help.. saved my life! literally!
If it's okay can I ask one more question please...
It's again for the same search engine I'm working on...
I've been trying to escape all the special characters from a html page
while extracting all the text on that page for that search.
I've tried this for the purpose:
$text1 = ereg_replace("&(.*);", " ", $text1);
Basically to insert all the special HTML characters to spaces.
It works when the string is small..but somehow when a pretty long string
is given, it gives up in the middle somewhere.
Again...any help and I'm so much grateful..
TIA,
Arjun.
-----------------
On Tue, 5 Sep 2000, The Captain wrote:
> on 9/5/00 6:35 PM, Arjun Saha at arjun@che.iitb.ernet.in wrote:
>
> > Hey all,
> > I'm new to this list.... I've been trying to find a method to find
> > out if a string is within quotes or not.. basically trying to make a
> > search engine.
> >
> > Any help would be absolutely fantastic.
> >
> > TIA,
> > Arjun.
> >
>
> I'm not exactly sure what you're trying to ask. If you looking to see if a
> string is:
>
> "My String" vs My String
>
> you can try this:
>
> if (ereg("\"(.*)\"",$the_string))
> /* string is between quotes */
> else
> /* string is not between quotes */
>
> Is this what you mean?
>
> The Captain
>
>
>
--
----------------------------------------------------------------------
Most computer problems are caused by a loose nut between
the chair and the keyboard.
-----------------------------------------------------------------------
Arjun Saha,
3rd Year Undergraduate Student,
Dept. of Chemical Engg.,
Indian Institute of Technology, Bombay.
Founder,
MyKindaStartup.com
-------------------------------------------------------------------------
P.S. Send all your mails to "arjunsaha@bigfoot.com".Thanx.
-------------------------------------------------------------------------