OOPS
FORGOT to mention that I modify the string to add a colon if it is entered
without one, so my regexp
always expects a ":" to be in the middle. So in actuality - my regexp is
'passing' a value of 13:00 as legitimate, when it should not be.
--
PHP General Mailing List (http://www.php.net/
oops!
Please see the change log for version 8.00 on
http://www.pcre.org/changelog.txt
Shiplu Mokadd.im
My talks, http://talk.cmyweb.net
Follow me, http://twitter.com/shiplu
SUST Programmers, http://groups.google.com/group/p2psust
Innovation distinguishes bet ... ... (ask Steve Jobs the rest)
On Tue, 2010-05-11 at 23:29 +0700, shiplu wrote:
> I think the error is related to changed described here.
> http://www.pcre.org/changelog.txt
>
> Shiplu Mokadd.im
> My talks, http://talk.cmyweb.net
> Follow me, http://twitter.com/shiplu
> SUST Programmers, http://groups.google.com/group/p2psust
I think the error is related to changed described here.
http://www.pcre.org/changelog.txt
Shiplu Mokadd.im
My talks, http://talk.cmyweb.net
Follow me, http://twitter.com/shiplu
SUST Programmers, http://groups.google.com/group/p2psust
Innovation distinguishes bet ... ... (ask Steve Jobs the rest)
Get a copy of http://www.weitz.de/regex-coach/ and contribute.
Use the pattern on your string, one section at a time.
On 5/10/2010 7:53 PM, Spud. Ivan. wrote:
Hi,
I've recently changed from php 5.1 to 5.3.2 and I'm havong problems with
preg_match, because the same regular expressions used i
Try this (don't pay attention to the name):
/**
* @param string $text
* @returnarray
* @since Sat Apr 29 01:35:37 CDT 2006
* @authorrsalazar
*/
function parse_phrases( $text ) {
$arr_pzas = array();
if ( preg_match_all('/(?(?=["\'])(["\']).+?
On Tue, 2004-02-24 at 10:49, Henry Grech-Cini wrote:
> http://www.alpha-geek.com/2003/12/31/do_not_do_not_parse_html_with_regexs.html
>
> Do we all agree or should I keep trying?
The important thing to keep in mind here is to use the right tool for
the job. If you are parsing an HTML document lo
Henry Grech-Cini schrieb:
I came accross this link
http://www.alpha-geek.com/2003/12/31/do_not_do_not_parse_html_with_regexs.html
">
http://www.alpha-geek.com/2003/12/31/do_not_do_not_parse_html_with_regexs.html
Do we all agree or should I keep trying?
Henry
hi henry,
this could be an interest
Henry Grech-Cini schrieb:
Thanks Sven,
You are quite right with your "some probs" comment.
hi,
think i found it. try this:
(.*)<\/fieldset>/iU';
?>
the '/U' stands for 'ungreedy'. also note the change in the attribs-regex.
hth SVEN
--
PHP General Mailing List (http://www.php.net/)
To unsubscr
I came accross this link
http://www.alpha-geek.com/2003/12/31/do_not_do_not_parse_html_with_regexs.html
">
http://www.alpha-geek.com/2003/12/31/do_not_do_not_parse_html_with_regexs.html
Do we all agree or should I keep trying?
Henry
--
PHP General Mailing List (http://www.php.net/)
To unsubsc
Thanks Sven,
You are quite right with your "some probs" comment.
Do you know what the the switch is that catches only the least result?
I now get
(0)=
(0)=[hello legendcontent of
helloblahgoodbye]
(1)=
(0)=[ attribute="hello"]
(2)=
(0)=[hello legendcontent of
helloblahgoodbye]
as we can see
Henry Grech-Cini schrieb:
...
$regexp="/]*)>[^(<\/fieldset>)]*/i";
...
$result=extractFieldsets('testcontent of
helloblahgoodbye');
...
And it produced;
(0)=
(0)=[con]
(1)=[goo]
(1)=
(0)=[ attribute="hello"]
(1)=[ attribute="goodbye"]
hi,
as it is defined in regex-spec: a '^' inside a char-group
Hi All,
I don't actually think regexp is fault. But if anyone could explain this or
give me some example code that will extract the attributes and data between
a "fieldset" tag pair I would be appreciated.
Henry
"Henry Grech-Cini" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi
hi marek,
thanx for your suggestion.
i have tried out the tokenizer but
1. i think its not realy final and can change in the future
2. the tokenizer can only find real php code but i need to find my
simplified php code without an ; on the end of an statement for example.
so the tokenizer doesn't
Forget regexp and try this function:
http://sk.php.net/manual/en/function.token-get-all.php
Jaaboo wrote:
I give an wrong example. Here is a better one
$txt = "func1($par1," 100 (euro)", func2($par2,"(c) by nobody"))";
if (preg_match_all('
/
([a-zA-Z]\w*?)
\s*
(
\(
(
(?>.*?)|
.*?(?R)*
I give an wrong example. Here is a better one
.*?)|
.*?(?R)*
)
\)
)+
/x
', $txt, $m)){
print_r($m);
} else {
echo "no match";
}
echo "\n";
?>
This must result in :
First call: func1($par1," 100 (euro)", func2($par2,"(c) by nobody"))
Second call with the inner part $par1," 100 (euro
Jome wrote:
Jens Lehmann wrote:
Hello,
I want to extract the "name"-attribute of all anchors out of an
HTML-source-code which don't have the "href"-attribute. I can use this
code to get the "name"-attribute:
preg_match_all('/]*?)name=[ \'\"](.*?)[
\'\"](.*?)>/is',$src,$ar);
The name-attributes ar
Jens Lehmann wrote:
> Hello,
>
> I want to extract the "name"-attribute of all anchors out of an
> HTML-source-code which don't have the "href"-attribute. I can use this
> code to get the "name"-attribute:
>
> preg_match_all('/]*?)name=[ \'\"](.*?)[
> \'\"](.*?)>/is',$src,$ar);
>
> The name-attribu
In article
<[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Thalis A. Kalfigopoulos) wrote:
> If I have as part of a text:
> ...and then 'the quick brown fox jumped over the lazy dog's piano'...
>
> How can I substitute the single quote in "dog's" with say \'
> I want to aply a substitution for only th
Hi mweb,
try this:
blah blah blah some text, html markup...
blah blah again";
$string = preg_replace("//i", "", $string);
echo nl2br($string);
?>
~James
"Mweb" <> wrote in message ...
Hello,
What is the right regexp to handle this, either in a while loop (how?)
or all by itself? The clo
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Andrew Perevodchik) wrote:
> ereg ("aaa(?:bbb|ccc)aaa", $string);
>
> It causes an error. However "?:" command is
> documented in a manual of my version of PHP4.
AFAIK, that is only documented in the preg_* chapter, and only applies to
the pr
The ereg() is not is not a a Perl Compatible regexp element!
try using preg_match() instead!
"Andrew Perevodchik" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Why doesn't this simple example work?
>
> ereg ("aaa(?:bbb|ccc)aaa", $string);
>
> It causes an err
"Andrew Perevodchik" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Why doesn't this simple example work?
>
> ereg ("aaa(?:bbb|ccc)aaa", $string);
>
> It causes an error. However "?:" command is
> documented in a manual of my version of PHP4.
It would probably
> >
> > This is wrong. It should be
> > Content-Type: multipart/mixed;
> > boundary="B42DA66C4EC07C9B572A58FC"
> >
> > I don't know why it is not reading the whole string. It seems to treat
> > the *boundary* part as another line.
>
> It _is_ another line; it just happens to s
On 16-Jul-01 Adrian D'Costa wrote:
> Hi James,
>
> Thanks for your mail. But I think the problem like somewhere else.
>
> I have the following:
> echo $buffer;
> There result :
> Content-Type: multipart/mixed;
>
> This is wrong. It should be
> Content-Type: multipart/mixed;
> boundary="--
Hi James,
Thanks for your mail. But I think the problem like somewhere else.
I have the following:
echo $buffer;
There result :
Content-Type: multipart/mixed;
This is wrong. It should be
Content-Type: multipart/mixed;
boundary="B42DA66C4EC07C9B572A58FC"
I don't know why it is
hi,,
u could try using explode function
eg:
arrayresult = explode(string, separator);
cont = explode(thestring, "\"");
echo cont[0] ;
// result as
Content-Type: multipart/mixed;
boundary=
echo cont[1];
//result as
B42DA66C4EC07C9B572A58FC
echo cont[2];
// array index 2 will be not
27 matches
Mail list logo