Rodrigo de Oliveira Costa wrote:
Hi guys I have the following intention and would really like to know
if tis possible and if its possible how should it be done.
I have a string that is something like this:
"1.
Prologue2. First days3. Drastic
choice4. Sowarocs5.
Training6. Teneb"
How can I re
Richard Lynch wrote:
On Tue, May 10, 2005 5:58 am, Merlin said:
I am writing an internal full text search engine and do have trouble in
outputting the text in an apropriate way.
Problem is that if there is more than one word I cant handle the text
cropping.
For example:
Search term: php germany
Tex
On Tue, May 10, 2005 5:58 am, Merlin said:
> I am writing an internal full text search engine and do have trouble in
> outputting the text in an apropriate way.
>
> Problem is that if there is more than one word I cant handle the text
> cropping.
>
> For example:
> Search term: php germany
> Text f
Jason Wong wrote:
str_pad(), please RTFM before you ask such questions. It's obvious from your
subject that you know it's something to do with strings, so where better than
to look at the chapter on String Functions? Browse through them, checkout the
examples, it's a good way to learn.
But I se
On Friday 13 August 2004 01:00, Matthew Oatham wrote:
> Hi I am trying to track down a method for transferring a database id such
> as 5 into a nice formatted order id such as ORD0005 - where the format for
> the order id is "ORD" + 5 digits made up of the database id
str_pad(), please RTFM before
> Hi I am trying to track down a method for transferring a database id
> such as 5 into a nice formatted order id such as ORD0005 - where the
> format for the order id is "ORD" + 5 digits made up of the database id
See documentation for sprintf().
Try something like:
$formatted = sprintf
On Wed, 11 Jun 2003 14:53:13 +0100, Marios Adamantopoulos wrote:
>[link][title]the link[/title][address]http://www.php.net[/address][/link]
>And I need to change it to this:
>http://www.php.net";>the link
E, fun try this :)
http://www.php.net[/address][/link]';
$out = preg_replace(
Use the substr function to get the part you want. Then prefix/suffix the
parts you want.
//you may want to derive the positions as vars
$rest = substr("abcdef", 1, 3); // returns "bcd"
//you may want to put the link name into a var as well for below
$rest = "the link"
Good Luck,
Jake Johnson
On 31-May-2003 S. Cole wrote:
> Hello all,
>
> I'm currently working on a site for my brother-in-law. I have written a
> script that will access a website
> (http://www.remax.nf.ca/listings.asp?a=163&cp=1) and pull the page into a
> variable ($var). I have striped the page down to include only
This is the best method
echo substr(strrchr($string, $char), 1);
On 21 February 2003 at 00:13:02, Gregory Heinrichs wrote:
> little help please, looking for correct functions to use to search for the
> last occurrence of a character in a string and truncate everything in
> front of i
Use strrpos() which will find the last occurrence of something in a
string then just use substr() to pull everything from that point on in
the string.
Kelly
-Original Message-
From: Gregory Heinrichs [mailto:[EMAIL PROTECTED]]
Sent: February 20, 2003 5:13 PM
To: [EMAIL PROTECTED]
Subject
Try this (untested):
print preg_replace('|<[^<]*$|','$1',$text);
Gregory Heinrichs wrote:
little help please, looking for correct functions to use to search for the
last occurrence of a character in a string and truncate everything in
front of it including the searched for character.<
--
going to work.
:
: Thanks!
:
: -Mensaje original-
: De: Justin French [mailto:justin@;indent.com.au]
: Enviado el: jueves, 24 de octubre de 2002 11:29
: Para: Francisco Vaucher; '[EMAIL PROTECTED]'
: Asunto: Re: [PHP] String manipulation
:
:
: Well, what you really trying to do? Validate the
11:29
Para: Francisco Vaucher; '[EMAIL PROTECTED]'
Asunto: Re: [PHP] String manipulation
Well, what you really trying to do? Validate the format of an email
address? If so, what you really should be doing is looking for an existing
library of code which validates email address formats agai
Well, what you really trying to do? Validate the format of an email
address? If so, what you really should be doing is looking for an existing
library of code which validates email address formats against the RFC
standard.
phpclasses.org is bound to have some, but I really like this one:
http:/
>Wow, Thank you for the explanation, it helped out a lot ;)
>I don't know regex very well, but I hope that this will give me a better
>understanding of it.
>Thank you Yet again,
>Mike
>
good luck understanding. personally it is one of those things that I dust
off and pull out the help docs e
PM
To: Mike; PHP List
Subject: Re: [PHP] String Manipulation
okay... the break down
the regexp: '(.*(\(|\[)|(\)|\]).*)'
.* = any character from zero to infinite number of times
(\(|\[) = either ( or [ (they are escaped with a "\" bcz they have other
meaning
then I have ano
ad. Sorry if I threw you off. You can just do it like this:
$text_out = ereg_replace('(.*(\(|\[)|(\)|\]).*)', '', $text_in);
Jim Grill
Support
Web-1 Hosting
http://www.web-1hosting.net
- Original Message -
From: "Mike" <[EMAIL PROTECTED]>
To: "'Tech Support'"
M
To: Mike; PHP List
Subject: Re: [PHP] String Manipulation
I tested this out with success.
$string = ereg_replace('(.*(\(|\[)|(\)|\]).*)', '', $string);
###
// Here is actual working code
$string1 = "(Something) - is wrong with me";
$string2 = "
Thanks, it worked like a charm ;)
Mike
-Original Message-
From: Tech Support [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 25, 2002 11:39 AM
To: Mike; PHP List
Subject: Re: [PHP] String Manipulation
I tested this out with success.
$string = ereg_replace
I tested this out with success.
$string = ereg_replace('(.*(\(|\[)|(\)|\]).*)', '', $string);
###
// Here is actual working code
$string1 = "(Something) - is wrong with me";
$string2 = "something - (is wrong with me)";
$string3 = "something - (is wrong with me";
$string4 = "[somet
Maybe something like:
eregi('([a-z]*)( *)(\(*)([a-z]+)( *)(\)*)([a-z]*)',$string,$matches);
echo $matches[4];
Op donderdag 25 juli 2002 17:13, schreef Mike:
> Hello all,
> I know that this has probably been discussed before and that you will
> tell me to go through all the back messages on the li
On Thursday 22 February 2001 23:42, Simon Garner wrote:
> This should do the trick (untested!):
>
> $contents = " alt=ThisOneReallyNeedsToBeAllLowercase.gif>";
>
> $contents = preg_replace("/([-_a-zA-Z0-9]+)\.gif/e",
> "strtolower('\\1') . '.gif'", $contents);
> ?>
simpler that
"/([-_a-
From: "Ian LeBlanc" <[EMAIL PROTECTED]>
>
> I am working on a site that has over 1000 pages and all the images need to
> be made lower case in the HTML.
> Here is what I have so far. Please someone tell me what I am doing wrong.
>
>
> $contents=" alt=ThisOneReallyNeedsToBeAllLowercase.gif>";
>
>
24 matches
Mail list logo