Hi,
I have two lines here as follows:
1 -0.123701962557954E+03 0.460967618024691E+02
-0.12354765900E+03 0.46259109000E+02
What I am trying to do here is to only have
1 -0.123701962557954E+03 0.460967618024691E+02 be the output so I
can do further
Alice Wei wrote:
Hi,
I have two lines here as follows:
1 -0.123701962557954E+03 0.460967618024691E+02
-0.12354765900E+03 0.46259109000E+02
What I am trying to do here is to only have
1 -0.123701962557954E+03 0.460967618024691E+02 be the output so
Hi,
I have two lines here as follows:
1 -0.123701962557954E+03 0.460967618024691E+02
-0.12354765900E+03 0.46259109000E+02
What I am trying to do here is to only have
1 -0.123701962557954E+03 0.460967618024691E+02 be the output so I
can do further
On Thu, 2009-02-26 at 10:09 -0500, Alice Wei wrote:
Hi,
I have two lines here as follows:
1 -0.123701962557954E+03 0.460967618024691E+02
-0.12354765900E+03 0.46259109000E+02
What I am trying to do here is to only have
1 -0.123701962557954E+03
Hi List
I must be dumb as I have been battling my way through regular expression
examples for a while and I can not work out why the following does not work
properly. I am the first to admit that regular expressions confuse me greatly.
The string is a piece of XML as follows and I have put that
# [EMAIL PROTECTED] / 2007-01-25 09:27:59 +1100:
I must be dumb as I have been battling my way through regular expression
examples for a while and I can not work out why the following does not work
properly. I am the first to admit that regular expressions confuse me greatly.
The string is a
Hi Roman,
RN Are you doing this to learn regular expressions or are you actually
RN trying to do work? Because you're going the wrong way.
RN It's XML, why do you treat it as text?
I am well aware it is XML and I could use an XML parser or simpleXML. I am
trying to learn regular expressions as I
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-01-25 09:27:59 +1100:
I must be dumb as I have been battling my way through regular expression
examples for a while and I can not work out why the following does not work
properly. I am the first to admit that regular expressions confuse me
# [EMAIL PROTECTED] / 2007-01-24 23:55:27 +0100:
Roman Neuhauser wrote:
Are you doing this to learn regular expressions or are you actually
trying to do work? Because you're going the wrong way.
It's XML, why do you treat it as text?
not everyone shares that sentiment. in terms of lowest
# [EMAIL PROTECTED] / 2007-01-25 09:27:59 +1100:
flights
flight flightId=19417361 addAdtPrice=0.0 addChdPrice=0.0
addInfPrice=0.0
legXRefs
legXRef legId=23862812 class=V/legXRef
legXRef legId=23862813
Hi Jochem,
JM accent voice=pirate
JM you be needing an ungreedy modifier on yer regex.
JM /accent
JM see here:
JM http://php.net/manual/en/reference.pcre.pattern.modifiers.php
RL Thanks very much. That solved my problem and I my now getting exactly what I
RL want. I had seen the
At 1/24/2007 02:27 PM, Richard Luckhurst wrote:
What I am trying to do is extract the first flight . /flight chunk.
...
preg_match('#flight .*\/flight#', $xml_string,$matches);
$tempstr = $matches[0];
What I actually get in $tempstr is everything from the first flight
through to
the
You want to add a 'U' after you closing # so that matches are
Ungreedy -- I.e., they do NOT grab as much text as the can to
fulfill the pattern (greedy) but they grab as LITTLE text as they can
to fulfill the pattern (ungreedy)
On Wed, January 24, 2007 4:27 pm, Richard Luckhurst wrote:
Hi List
Richard Luckhurst wrote:
Hi Jochem,
JM accent voice=pirate
JM you be needing an ungreedy modifier on yer regex.
JM /accent
JM see here:
JM http://php.net/manual/en/reference.pcre.pattern.modifiers.php
Thanks very much. That solved my problem and I my now getting exactly what I
Roman Neuhauser wrote:
# [EMAIL PROTECTED] / 2007-01-24 23:55:27 +0100:
Roman Neuhauser wrote:
Are you doing this to learn regular expressions or are you actually
trying to do work? Because you're going the wrong way.
It's XML, why do you treat it as text?
not everyone shares that sentiment.
Hi Guy and Gay ?
I have the following code supposed to transform date format like this 04 desambra 1975
into 1975-12-04.
User can use whatever language he want like french, english, malagasy even Bichlamar-
for example : 04, otis 1975 = 04 aout 1975 = 04 aogositra 1975 = 04-août 1975 = 04
I just moved some *working* code from a Win2k server running PHP 4.2.1
to a FreeBSD server running 4.2.3 and the following code no longer
works...
$templatetext = preg_replace(/!-- include\(\([[:ascii:]]+?)\\)
--/e, g_includecallback(\\\1\), $templatetext);
if
Hey all!
I'm trying to get this darn eregi_replace() to work, but it doesn't produce any
results at all.
I want it to find all occurances of PHP variables. Here is the regexp
$output = eregi_replace(^[\$]{1,2}[a-zA-Z][0-9]+$, b\\1/b, $var);
As you might guess this is for a syntax
On Wednesday 03 July 2002 01:40, Martin Clifford wrote:
Hey all!
I'm trying to get this darn eregi_replace() to work, but it doesn't produce
any results at all.
I want it to find all occurances of PHP variables. Here is the regexp
$output = eregi_replace(^[\$]{1,2}[a-zA-Z][0-9]+$,
Even this:
$output = preg_replace(/^[\$]{1,2}[a-zA-Z][0-9]+$/, b\\1/b, $var);
echo $output;
Doesn't work. It just takes whatever you put into $var, then puts it into $output,
and outputs it to the screen.
I want to change anything resembling a PHP variable, i.e. $var, $$var or $var to
On Tuesday, July 2, 2002, at 01:40 PM, Martin Clifford wrote:
I'm trying to get this darn eregi_replace() to work, but it doesn't
produce any results at all.
I want it to find all occurances of PHP variables. Here is the regexp
$output = eregi_replace(^[\$]{1,2}[a-zA-Z][0-9]+$, b\\1/b,
On Wednesday 03 July 2002 01:59, Martin Clifford wrote:
Even this:
$output = preg_replace(/^[\$]{1,2}[a-zA-Z][0-9]+$/, b\\1/b, $var);
echo $output;
Doesn't work. It just takes whatever you put into $var, then puts it into
$output, and outputs it to the screen.
I want to change anything
- don't use /^ .. $/ if you want to replace all occurences. ^ and $ refer
to the very start and end of the whole string
and make no sense at all - at least in this case. your regexp will not
match at all unless $var contains only a
single variable and nothing more
- either capture
Hello,
I am still having problems with the regular expressions. Looks like there
has been a change in the way they are handled between PHP3 and PHP4, since
the code worked with PHP3 !!
I need to search for all words having alphanumberic characters as well as _
(underscore) which are prefixed
This code works fine:
eregi(__([a-z0-9_]+)__, Hello __WO_RD__ Test, $Matches);
echo $Matches[1];
produces:
WO_RD
-Rasmus
On Thu, 28 Mar 2002, Sharat Hegde wrote:
Hello,
I am still having problems with the regular expressions. Looks like there
has been a change in the way they are
Rasmus,
The code worked fine in PHP Version 3.x
It does not work with PHP Version 4.1.1. That is where I have a problem.
With Regards,
Sharat
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Sharat Hegde [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Regular Expression Problem continues
Version 4.1.1. That is where I have a problem.
With Regards,
Sharat
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Sharat Hegde [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Regular Expression Problem continues
Date: Thu, 28 Mar 2002 02:33:16 -0800 (PST)
This code works fine
Hegde [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Regular Expression Problem continues
Date: Thu, 28 Mar 2002 02:33:16 -0800 (PST)
This code works fine:
eregi(__([a-z0-9_]+)__, Hello __WO_RD__ Test, $Matches);
echo $Matches[1];
produces:
WO_RD
-Rasmus
On Thu, 28
PROTECTED]
To: Sharat Hegde [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Regular Expression Problem continues
Date: Thu, 28 Mar 2002 12:51:44 -0600 (CST)
Works for me in 4.1.1 (and 4.1.2) too. Are you sure there's not something
else going on? Can you provide an unadulterated code sample
://www.byronholidays.com/inikatest/testereg.php
To check the PHP version on the server, you can run
http://www.byronholidays.com/inikatest/checkenv.php3
Regards,
Sharat
From: Miguel Cruz [EMAIL PROTECTED]
To: Sharat Hegde [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Subject: Re: [PHP] Regular Expression
.
With Regards,
Sharat
From: Rasmus Lerdorf [EMAIL PROTECTED]
To: Sharat Hegde [EMAIL PROTECTED]
CC: [EMAIL PROTECTED], [EMAIL PROTECTED]
Subject: Re: [PHP] Regular Expression Problem continues
Date: Thu, 28 Mar 2002 11:40:41 -0800 (PST)
In your configure flags you have: --with-regex=system
Why did you do
While I try and request for a recompile of the system, is there an
alternate way out?
Why don't you use the PCRE functions instead.
The equivalent preg would be:
preg_match(/__([a-z0-9_]+)__/i, Hello __WO_RD__ Test, $Matches)
By the way, what is the significance of the switch
Hello,
In PHP3, I am using code which using the regular expression capability of
PHP. The code matches all occurences of string prefixed by __ (2
underscores) and having alphanumeric characters as well as _ (1 underscore)
within it.
The code is as follows:
while (eregi(__([a-z0-9_]+)__,
__([a-z0-9][a-z0-9_]+)__
-Original Message-
From: Sharat Hegde [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 22, 2002 4:22 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Regular Expression Problem
Hello,
In PHP3, I am using code which using the regular expression capability of
PHP
Hi,
Could someone be kind enough to have a look at this regular expression
and perhaps tell me why is returns false when a '-' character is
included in the $center string?
if (eregi(^[a-zA-Z0-9!@#\$%^\*\(\),/.//\?;':\~`_\+\|\-\\\t\n\
]*$, $center))
{
return true;
}
else
{
Original Message -
From: Ross Nielsen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, August 27, 2001 9:42 PM
Subject: [PHP] Regular Expression Problem and PHP 4 (urgent) --- continued
Well my first solution didn't really work the way I needed it too so
here
goes again...
Data
Well my first solution didn't really work the way I needed it too so here
goes again...
Data returned from server process looks like following...
Header
datadatadatadata[link]datadatadata{link}data[link]
datadata{link}data[link]datadatadata{link}data[link]
: Monday, August 27, 2001 9:42 PM
Subject: [PHP] Regular Expression Problem and PHP 4 (urgent) --- continued
Well my first solution didn't really work the way I needed it too so here
goes again...
Data returned from server process looks like following...
Header
datadatadatadata[link
Here is the problem:
I'm retrieving a page of data from another process using PHP4 on Solaris
2.51
This data is placed in an array by line and simply returned to the browser
after formatting.
A sample line may look something like this:
blah blah blah blah blah Link blah blah blah blah Link
I
39 matches
Mail list logo