Hi,
I'm trying to use eregi_replace to check a user-submitted URL, but I
keep getting the following error message:
Warning: Invalid range end in /var/www/html/_db_db/db_input.php
This what I'm using:
$pattern = (http://)?([^[:space:]]+)([[:alnum:]\.-_?/=]);
$replace = http://\\2\\3;;
$URL =
PROTECTED]
Sent: Wednesday, June 05, 2002 8:22 AM
Subject: [PHP] Regular Expressions Help
Hi,
I'm trying to use eregi_replace to check a user-submitted URL, but I
keep getting the following error message:
Warning: Invalid range end in /var/www/html/_db_db/db_input.php
This what I'm using
- Original Message -
From: J. Younker [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, June 05, 2002 8:22 AM
Subject: [PHP] Regular Expressions Help
Hi,
I'm trying to use eregi_replace to check a user-submitted URL, but I
keep getting the following error message:
Warning: Invalid
I've been banging my head against regular expressions all night... help
would be greatly appreciated. Could you give me examples on how to do the
following?
Pull everything except a specific word from a sentence. For example,
pulling everything except the word run from the water run was
On Tuesday 30 April 2002 15:51, Ed Lazor wrote:
I've been banging my head against regular expressions all night... help
would be greatly appreciated. Could you give me examples on how to do the
following?
Is this for a programming assignment/exercise? Do you /have/ to use regex?
Other
I'm trying to find files in my array
for example
=lg_imode.gif
and
=/db/imodeklein/edgar-IMODE-1-.gif
I want to differentiate between the files with slash at the front and ones
without so that
I can add a server path !
but as usual I' m having problems with the correct regex
At the moment I've
-Original Message-
From: John Fishworld [mailto:[EMAIL PROTECTED]]
Sent: 30 April 2002 09:32
I'm trying to find files in my array
for example
=lg_imode.gif
and
=/db/imodeklein/edgar-IMODE-1-.gif
I want to differentiate between the files with slash at the
front and ones
On Tuesday 30 April 2002 16:31, John Fishworld wrote:
I'm trying to find files in my array
for example
=lg_imode.gif
and
=/db/imodeklein/edgar-IMODE-1-.gif
Perhaps you should clarify your problem. First of all does your array contain
just gif files (ie *.gif) or does it contain all sorts
Okay right I'm experimenting with an i-mode parser !
I copy the file (url entered) to a local location !
Then read through the whole file line at a time and change/replace the
things that need replaceing !
On of the things that I need to replace is the links to the pictures so that
they still
On Tuesday 30 April 2002 19:17, John Fishworld wrote:
Okay right I'm experimenting with an i-mode parser !
I copy the file (url entered) to a local location !
Then read through the whole file line at a time and change/replace the
things that need replaceing !
On of the things that I need to
$imode_code = file($url_file);
$file_name = basename($url_file);
$path = dirname($url_file);
$stripped_path = eregi_replace(^(.{2,6}://)?[^/]*/, , $path);
$next_path = eregi_replace($stripped_path, , $path);
$next_path_1 = eregi_replace(/$ , , $next_path);
// create and open a file to write to
On Tuesday 30 April 2002 19:43, John Fishworld wrote:
$imode_code = file($url_file);
$file_name = basename($url_file);
$path = dirname($url_file);
$stripped_path = eregi_replace(^(.{2,6}://)?[^/]*/, , $path);
On Tuesday 30 April 2002 19:17, John Fishworld wrote:
Okay right I'm
Duh ! lol sorry !
Example 1
html
head
meta http-equiv=content-type content=text/html;charset=iso-8859-1
meta name=generator content=Edit Plus
titleLocations/title
/head
body bgcolor=#6699FF
div align=center
pfont color=blackWelcome tobr
/fontfont color=redimg src=lg_imode.gif alt=
On Tue, 30 Apr 2002, Ed Lazor wrote:
Pull everything except a specific word from a sentence. For example,
pulling everything except the word run from the water run was steep.
$str = 'the water run was steep';
print preg_replace('/(\s*water)/', '', $str);
Pull all words from a string
On Tuesday 30 April 2002 21:09, John Fishworld wrote:
Duh ! lol sorry !
img src=/db/imodeklein/edgar-IMODE-1-.gif vspace=2br#59091;nbsp;a
href=imode.fpl?op=imodecardprefix=IMODEnummer=1suffx=uid=55%2eFAGAEpa
Unfortunately, no. Could you post say 20 lines of this file you're
talking
Thanks after playing about with that I've got the following which does seem
to work !
$imode_code[$i] = eregi_replace((src=)(\)([a-z0-9_\/-]+\.gif)(\),
\\1\\2$path/\\3\\2, $imode_code[$i]);
Very very very slowly getting the hang of regexs !
What does your /i do at the end ???
Thanks
Try
On Wed, 1 May 2002, John Fishworld wrote:
Thanks after playing about with that I've got the following which does seem
to work !
$imode_code[$i] = eregi_replace((src=)(\)([a-z0-9_\/-]+\.gif)(\),
\\1\\2$path/\\3\\2, $imode_code[$i]);
Very very very slowly getting the hang of regexs !
aha !
thats very strange then because mine works at the moment but if I add the /i
at the end then it doesn't !
On Wed, 1 May 2002, John Fishworld wrote:
Thanks after playing about with that I've got the following which does
seem
to work !
$imode_code[$i] =
I wasn't paying that much attention. The /i is a preg thing. It's the same
as changing from ereg to eregi.
miguel
On Wed, 1 May 2002, John Fishworld wrote:
aha !
thats very strange then because mine works at the moment but if I add the /i
at the end then it doesn't !
On Wed, 1 May 2002,
I am trying to do a match for an expression and it to a variable from the
output of a command:
?php
$lines = file ($file);
while (list ($line_num, $line) = each ($lines)) {
$trimline = trim ($line);
$output = shell_exec ($prog $cmdline $trimline );
}
?
How can look through $output to
With there be a specifc number of variables returne? Or can the number of
variables vary?
-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:26 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Regular Expressions? Help!
I am trying to do a match
'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions? Help!
With there be a specifc number of variables returne? Or can the number of
variables vary?
-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:26 PM
To: '[EMAIL PROTECTED
. Any
ideas?
-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 1:54 PM
To: 'Walker, Roy'
Subject:RE: [PHP] Regular Expressions? Help!
well, ya might try:
$my_array = explode( \ ,$output);
this would set:
$my_vars[0] = variable1
exec()
-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:05 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!
I just realized why nothing I was trying for the regular expressions wasn't
working. The command I am
Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:07 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions? Help!
exec()
-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25
PROTECTED]]
Sent: Monday, March 25, 2002 2:27 PM
To: 'Rick Emery'; '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!
Perhaps it is how I am calling the $lines in a while loop.? I have tried
`$cmd`, exec(), exec($cmd, $ouput) (to capture the output as an array),
system(), shell_exec
:50 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions? Help!
exec() works for me.
Remember, though, it returns only the LAST line. Have you tried the
following to ensure it's constructing the command you think it is:
$mycmd = $prog $cmdline $trimline
]'
Subject: RE: [PHP] Regular Expressions? Help!
The cmd is running running correctly as I see the output on the screen (this
is being run from a command line). The command output is seen on the screen
and nothing gets set to $output.
-Original Message-
From: Rick Emery [mailto:[EMAIL
'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions? Help!
Again, I ask:
Does $mycmd contain the command you expect to see
$mycmd = $prog $cmdline $trimline ;
print $mycmd;
$output = exec($mycmd);
-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday
When the exec'd program executes from the command line, does it output a
blank line as its last line?
-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:05 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!
I just
? Help!
When the exec'd program executes from the command line, does it output a
blank line as its last line?
-Original Message-
From: Walker, Roy [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 2:05 PM
To: '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!
I just
: Monday, March 25, 2002 3:09 PM
To: 'Rick Emery'; '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help!
No. I think there is a carriage return (\n), but there is not a blank line
at the end.
-Original Message-
From: Rick Emery [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25
At 25.03.2002 14:26, you wrote:
Perhaps it is how I am calling the $lines in a while loop.? I have tried
`$cmd`, exec(), exec($cmd, $ouput) (to capture the output as an array),
system(), shell_exec(). None of them let me capture the STDOUT from the
program. There has to be a way to do this.
: Monday, March 25, 2002 12:26 PM
To: '[EMAIL PROTECTED]'
Subject: [PHP] Regular Expressions? Help!
I am trying to do a match for an expression and it to a variable from the
output of a command:
?php
$lines = file ($file);
while (list ($line_num, $line) = each ($lines)) {
$trimline = trim ($line
exec() can capture ALL output from a command if you supply an array as the
second argument to it
-Original Message-
From: Darren Gamble [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 25, 2002 3:58 PM
To: 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject: RE: [PHP] Regular Expressions? Help
PM
To: 'Darren Gamble'; 'Walker, Roy'; '[EMAIL PROTECTED]'
Subject:RE: [PHP] Regular Expressions? Help!
exec() can capture ALL output from a command if you supply an array as the
second argument to it
-Original Message-
From: Darren Gamble [mailto:[EMAIL PROTECTED]]
Sent
36 matches
Mail list logo