preg syntax is different to ereg (which you are using). You also need to
provide an output variable.
This would work:
preg_match( "/[0-9]+/", $input, $output );
--
Matt
"Carl E Shmidt" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Now I'm looking to find
Very nice. I was going to suggest:
But uhhh, your way is much nicer :]
- Original Message -
From: "Richard Archer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 26, 2002 4:04 AM
Subject: Re: [PHP] Regular Expression Challenge
> At 11:30 AM +1000 26/3/02, Cameron Ju
You can do recursive matching using the (?R) syntax in preg functions (Perl
Compatible Regular Expression).
- Original Message -
From: "Christopher William Wesley" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Cameron Just" <[EMAIL PROTECTED]>
Sent: Tuesday, March 26, 2002 1:01 AM
Subj
Oh, I didnt read the bit at the bottom about the times appearing any number
of times. Off the top of my head I think this should work...
PREG:
"/'([a-z]+)-([a-z]+)\s(?:([0-9]+(?::[0-9]+|))(?:,\s)?)*'/"
--
Matt
- Original Message -
From: "Cameron Just" <[EMAIL PROTECTED]>
To: <[EMAIL P
Perl Compatible Regular Expression:
"/'([a-z]+)-([a-z]+)\s([0-9]+:[0-9]+),\s([0-9]+:[0-9]+),\s([0-9]+:[0-9]+)'/"
Assuming the days of the week are always lower case? if not then use
[a-zA-Z] for the day matching.
Hope this helps.
--
Matt.
- Original Message -
From: "Cameron Just" <[E
You can convert both date formats into a UNIX timestamp, then do a
picturedate > logindate.
To convert them into a unix timestamp you need to use strtotime function
http://www.php.net/manual/en/function.strtotime.php
$ldate = strtotime($logindate);
$pdate = strtotime($picturedate);
I have a script that outputs an image. Using the gd library. But the only way this
script gets to execute is if you call it like:
www.host.com/displayimage.php
That then sends the content header, and the image. Obviously I am doing some other
stuff in there, which is why I am using a scr
You could use the following preg statement:
preg_match_all( "/(.*(?=<\/table>))/", $string, $output,
PREG_SET_ORDER );
This would put all matches of some code, text, whatever into
the $output array. however you would start to have problems when you come
across nested tables. You'd need somethi
If you dont mind downloading ~50 messages a day, then I'd recommend this
group :]
Regards
Matt.
- Original Message -
From: "Julie Hull" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 03, 2002 2:16 AM
Subject: [PHP] Holy Moly...
> Could someone please direct a tota
Im looking to change my hosting provider.
...something that isnt going to break the bank, is feature full, supports mysql, php
etc etc and doesnt limit your bandwidth usage! I need about 100+ mb's of space, and
possibly the ability to run a background process.
Can anyone here suggest a good
Hey guys. Any insight into this problem im experiencing would be much appriciated...
I installed some software on my web space a while back, I ran a script and it
extracted some files from a tar ball I had uploaded. This was all designed to make
the package easy to install and set up. The id
11 matches
Mail list logo