To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
On 20 January 2005 20:36, Tim Boring wrote:
On Thu, 2005-01-20 at 14:40, Bret Hughes wrote:
On Thu, 2005-01-20 at 12:43, Jason Wong wrote:
On Friday 21 January 2005 02:16,
Tim Boring wrote:
Hello! I'm having an odd regex problem. Here's a summary of what I'm
trying to accomplish:
switch ($line)
{
case ($total_counter = 5):
break;
case preg_match(/^\W+/, $line):
While it would be Really Nifty (tm) if PHP worked this way, as
On Thu, 2005-01-20 at 11:59, Richard Lynch wrote:
Tim Boring wrote:
Hello! I'm having an odd regex problem. Here's a summary of what I'm
trying to accomplish:
switch ($line)
{
case ($total_counter = 5):
break;
case preg_match(/^\W+/, $line):
On Thu, 2005-01-20 at 12:59, Richard Lynch wrote:
Tim Boring wrote:
Hello! I'm having an odd regex problem. Here's a summary of what I'm
trying to accomplish:
switch ($line)
{
case ($total_counter = 5):
break;
case preg_match(/^\W+/, $line):
On Friday 21 January 2005 01:52, Tim Boring wrote:
To try to help spot the issue, I put in the if(preg_match(/^\W+/,
$line)) logic, and the weird thing is that this logic isn't outputting
the line beginning with things like AKRN, yet the same line is getting
caught in the switch statement and
On Friday 21 January 2005 02:16, Tim Boring wrote:
It's perfectly legit to use expressions. Now perhaps there is something
wrong with the regex I'm trying to use, but using a regex in and of
itself is legal.
http://www.php.net/manual/en/control-structures.switch.php
Yes, but comparing those
On Thu, 2005-01-20 at 13:41, Jason Wong wrote:
On Friday 21 January 2005 01:52, Tim Boring wrote:
Well the biggest problem in your code right now is your incomprehensible (to
me anyway) use of the switch construct. For a start I've no idea why you're
using ...
switch ($line)
...
On Thu, 2005-01-20 at 12:43, Jason Wong wrote:
On Friday 21 January 2005 02:16, Tim Boring wrote:
It's perfectly legit to use expressions. Now perhaps there is something
wrong with the regex I'm trying to use, but using a regex in and of
itself is legal.
Tim Boring wrote:
It's perfectly legit to use expressions. Now perhaps there is something
wrong with the regex I'm trying to use, but using a regex in and of
itself is legal.
http://www.php.net/manual/en/control-structures.switch.php
Ah...
Well, the User Contributed notes provide some
On Friday 21 January 2005 03:21, Tim Boring wrote:
On Thu, 2005-01-20 at 13:41, Jason Wong wrote:
On Friday 21 January 2005 01:52, Tim Boring wrote:
Well the biggest problem in your code right now is your incomprehensible
(to me anyway) use of the switch construct. For a start I've no
Tim Boring wrote:
On Thu, 2005-01-20 at 13:41, Jason Wong wrote:
On Friday 21 January 2005 01:52, Tim Boring wrote:
Well the biggest problem in your code right now is your incomprehensible
(to
me anyway) use of the switch construct. For a start I've no idea why
you're
using ...
On Thu, 2005-01-20 at 13:21, Tim Boring wrote:
On Thu, 2005-01-20 at 13:41, Jason Wong wrote:
On Friday 21 January 2005 01:52, Tim Boring wrote:
Well the biggest problem in your code right now is your incomprehensible
(to
me anyway) use of the switch construct. For a start I've no
Tim Boring wrote:
On Thu, 2005-01-20 at 13:41, Jason Wong wrote:
I suspect what you want to be doing is something like this:
switch (TRUE) {
case ANY_EXPRESSION_THAT_EVALUATES_TO_TRUE:
...
}
Thanks for the suggestion, but I'm not sure that does what I'm looking
for. I really
On Thu, 2005-01-20 at 14:40, Bret Hughes wrote:
On Thu, 2005-01-20 at 12:43, Jason Wong wrote:
On Friday 21 January 2005 02:16, Tim Boring wrote:
It's perfectly legit to use expressions. Now perhaps there is something
wrong with the regex I'm trying to use, but using a regex in and of
On Thu, 2005-01-20 at 13:43, Jason Wong wrote:
On Friday 21 January 2005 02:16, Tim Boring wrote:
It's perfectly legit to use expressions. Now perhaps there is something
wrong with the regex I'm trying to use, but using a regex in and of
itself is legal.
On Thu, 2005-01-20 at 14:06, Bret Hughes wrote:
I think I see a possible explanation for the behavior. preg_replace
does not return a true or false value it returns the string passed as
the subject with any matched replacements done. Hmm the manual says it
better:
If matches are found,
On Thu, 2005-01-20 at 15:13, Michael Sims wrote:
Tim Boring wrote:
On Thu, 2005-01-20 at 13:41, Jason Wong wrote:
I suspect what you want to be doing is something like this:
switch (TRUE) {
case ANY_EXPRESSION_THAT_EVALUATES_TO_TRUE:
...
}
Thanks for the suggestion,
Tim Boring wrote:
Hello! I'm having an odd regex problem. Here's a summary of what I'm
trying to accomplish:
I've got a report file generated from our business management system
(Progress 4GL), one fixed-width record per line. I've got a php script
that reads in the raw file one line at a time,
18 matches
Mail list logo