Google Style Search Results

Google Style Search Results

am 07.12.2005 21:04:07 von dpgirago

We are developing a website where our intranet users can put in keywords
and search a document database (MySQL). Results returned would appear
similar to a Google search. We have the text stripped from the 750+
articles using pdf2txt and have added a full text index to the db table; a
query using "match" - "against" works extremely well. We'd like to display
a few sentences or sentence fragments from the articles with the key words
in bold, again, Google-like. I guess "exploding" the text from the db on
an empty space would get each word into an array for processing, but this
seems very tedious.

If anybody has any other ideas about how else to go about this, or has done
something similar, I'd appreciate the advice.

Thanks,

David

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Google Style Search Results

am 07.12.2005 21:11:25 von Joseph Crawford

------=_Part_5616_19734123.1133986285487
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

why not use substr?
$preview =3D substr($string, 0, 50) .'...';

it will probably cut off in the middle of a word, but you can use strpos an=
d
check to see if the char is a space to get to the point you want.

--
Joseph Crawford Jr.
Zend Certified Engineer
Codebowl Solutions, Inc.
1-802-671-2021
codebowl@gmail.com

------=_Part_5616_19734123.1133986285487--

Re: Google Style Search Results

am 07.12.2005 21:17:07 von dpgirago

It's possible that the keywords wouldn't be in the first X numbers of
characters.




|---------+------------------------------------------>
| | |
| | |
| | Joseph Crawford|
| | |
| | |
| | |
| | |
| | 12/07/2005 02:11 PM|
| | |
| | |
| | |
|---------+------------------------------------------>
>----------------------------------------------------------- ------------------------------------------------------|
| |
| |
| |
|To: |
| "[PHP-DB] Mailing List" |
|cc: |
| |
| |
| |
| |
| |
|Subject: |
| Re: [PHP-DB] Google Style Search Results |
| |
>----------------------------------------------------------- ------------------------------------------------------|




why not use substr?
$preview = substr($string, 0, 50) .'...';

it will probably cut off in the middle of a word, but you can use strpos
and
check to see if the char is a space to get to the point you want.

--
Joseph Crawford Jr.
Zend Certified Engineer
Codebowl Solutions, Inc.
1-802-671-2021
codebowl@gmail.com

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Google Style Search Results

am 07.12.2005 22:07:27 von Philip Hallstrom

>
>> why not use substr?
>> $preview = substr($string, 0, 50) .'...';
>>
>> it will probably cut off in the middle of a word, but you can use strpos
>> and
>> check to see if the char is a space to get to the point you want.
>>
>> It's possible that the keywords wouldn't be in the first X numbers of
>> characters.

Then use strstr() to find the first occurence of the first keyword and
then use substr with an initial offset...

-philip

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Google Style Search Results

am 07.12.2005 22:15:51 von dpgirago

Thanks Joseph and Philip. I think that will work very well.

>> why not use substr?
>> $preview = substr($string, 0, 50) .'...';
>>
>> it will probably cut off in the middle of a word, but you can use strpos
>> and
>> check to see if the char is a space to get to the point you want.
>>
>> It's possible that the keywords wouldn't be in the first X numbers of
>> characters.

> Then use strstr() to find the first occurence of the first keyword and
> then use substr with an initial offset...


David

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Google Style Search Results

am 09.12.2005 09:24:40 von Julien Bonastre

------=_NextPart_000_0024_01C5FCED.D1B8E010
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Sure,=20

Firstly, thank you for the credit, that was only my second mid-scale =
project, coded ground up in Textpad 4 ;-)=20

enough patting my own back, onto business..

http://aries.the-spectrum.org/webdev/wawd/forums/search.php? q=3Dsufficien=
t%2Blarge&st=3Dpost&sb%5B%5D=3D*&maxres=3D25&ob=3Ddatetime&o t=3DDESC



Notice some changes??


You've just sparked a interest in me to revise and rewrite some of the =
code for that page this lovely 33 degree celcius summer Friday afternoon =
here in Australia.. :-)


Previously, it was only really just pumping out the first sentence or so =
of text from the matched query..


Now though it is actually going through each query word and matching a =
set number of words surrounding it [in this case I've made it five] and =
throwing that out in the extraction field... with each of these said =
matches being seperated by a ellipsis [...]


All I did was conjure up a regular expression that basically just =
matches words :-) haha ironically..


Here it is:

$extract_result=3D"";
preg_match_all("/((?:[\w]+ ?){0,5})[\w =
\.\,\-\;]((?:".join("|",$q_arr)."))([\w]*)[\w \.\,\-\;]((?:[\w]+ =
?){0,5})/i",$row["content"],$ext_matches,PREG_SET_ORDER);
foreach($ext_matches as $ext_arr) {
$extract_result .=3D $ext_arr[1]." =
".$ext_arr[2]."".$ext_arr[3]." ".$ext_arr[4]." ... ";
}


Are you familiar with regex?

It really shouldn't be hard to implement a similiar concept with =
whatever your current search system does.. My system as can be seen from =
this above code actually breaks up the query string sent via the form on =
search page into each word.. therefore you have an array [$q_arr] that =
looks like Array( "sufficient", "large") ..

Hence in that regex above i just did a "join" using the "|" pipe =
symbol.. I use this so when it joins all the words together they come =
out as: word1|word2|word3

meaning regex will match 5 or less words before and after any of the =
given words. the | symbol means bitwise "OR", for example:

run(ning|ner)=20

will match running or runner but not runs

Sorry if you already know some of this I am just trying to make sure I =
explain myself fully as I am unawares as to your experience level.

Anyway, so yes I simply use the handy preg_match_all function which will =
run this regex statement upon the entire $row["content"] which in my =
case is just the entire content of the post which it found to match =
words in.. and from that it simply matches these certain given keywords =
and their surrounding word/s..

I then use a foreach structure to simply iterate over each of the =
matches and create the lovely string you see before you, it does this =
simply by reprinting the original matched string, creating a =
bold effect on the given search word and adding an ellipsis at the end =
for simple athestic reasons..



If you want any more examples or clarification please feel free to ask..



Enjoy ;-)



---oOo--- Allowing users to execute CGI scripts in any directory should =
only be considered if: ... a.. You have no users, and nobody ever visits =
your server. ... Extracted Quote: Security Tips - Apache HTTP Server =
---oOo--- ------oOo---------------oOo------ Julien Bonastre [The_RadiX] =
The-Spectrum Network CEO ABN: 64 235 749 494 julien@the-spectrum.org =
www.the-spectrum.org ------oOo---------------oOo------=20
----- Original Message -----=20
From:
To: "Julien Bonastre"
Sent: Friday, December 09, 2005 12:42 AM
Subject: Re: [PHP-DB] Google Style Search Results


>=20
> Great site, Julien! Probably more involved than we need for our =
project,
> but very, very impressive. I really like the CSS styling in =
particular. If
> you could tell me how you are displaying the content within the =
"extract"
> field, that would be very helpful.
>=20
> Regards,
>=20
> David
>=20
>=20
> David P. Giragosian, Psy.D.
> Database and Software Developer
> 713-798-7898
>=20
>=20
> |---------+------------------------------------------>
> | | |
> | | |
> | | "Julien Bonastre"|
> | | |
> | | |
> | | |
> | | |
> | | 12/08/2005 05:23 AM|
> | | Please respond to "Julien|
> | | Bonastre"|
> | | |
> | | |
> |---------+------------------------------------------>
> =
>----------------------------------------------------------- -------------=
-----------------------------------------|
> | =
|
> | =
|
> | =
|
> |To: =
|
> | =
|
> |cc: =
|
> | =
|
> | =
|
> | =
|
> | =
|
> | =
|
> |Subject: =
|
> | Re: [PHP-DB] Google Style Search Results =
|
> | =
|
> =
>----------------------------------------------------------- -------------=
-----------------------------------------|
>=20
>=20
>=20
>=20
> Try a quick visit to:
> =
http://aries.the-spectrum.org/webdev/wawd/forums/search.php? q=3Ddone&st=3D=
post&sb%5B%5D
> =3D*&maxres=3D25&ob=3Ddatetime&ot=3DDESC
>=20
>=20
> If you are interested in that, I can tell you more..
>=20
> ----- Original Message -----
> From:
> To:
> Sent: Thursday, December 08, 2005 7:15 AM
> Subject: Re: [PHP-DB] Google Style Search Results
>=20
>=20
>>
>> Thanks Joseph and Philip. I think that will work very well.
>>
>>>> why not use substr?
>>>> $preview =3D substr($string, 0, 50) .'...';
>>>>
>>>> it will probably cut off in the middle of a word, but you can use
> strpos
>>>> and
>>>> check to see if the char is a space to get to the point you want.
>>>>
>>>> It's possible that the keywords wouldn't be in the first X numbers =
of
>>>> characters.
>>
>>> Then use strstr() to find the first occurence of the first keyword =
and
>>> then use substr with an initial offset...
>>
>>
>> David
>>
>> --
>> PHP Database Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>=20
>=20
>=20
>=20
>=20
>
------=_NextPart_000_0024_01C5FCED.D1B8E010--

Re: Google Style Search Results

am 09.12.2005 10:10:52 von Graham Cossey

On 12/9/05, Julien Bonastre wrote:

> http://aries.the-spectrum.org/webdev/wawd/forums/search.php? q=3Dsufficien=
t%2Blarge&st=3Dpost&sb%5B%5D=3D*&maxres=3D25&ob=3Ddatetime&o t=3DDESC
>

>
> All I did was conjure up a regular expression that basically just matches=
words :-) haha ironically..
>
>
> Here it is:
>
> $extract_result=3D"";
> preg_match_all("/((?:[\w]+ ?){0,5})[\w \.\,\-\;]((?:".join("|",$q_arr).=
"))([\w]*)[\w \.\,\-\;]((?:[\w]+ ?){0,5})/i",$row["content"],$ext_matches,P=
REG_SET_ORDER);
> foreach($ext_matches as $ext_arr) {
> $extract_result .=3D $ext_arr[1]." ".$ext_arr[2]."".$ext_arr[3=
]." ".$ext_arr[4]." ... ";
> }
>
>
> Are you familiar with regex?
>


I'm not very familiar with regex at all and was wondering if you could
tell me how your regex would handle two matched search strings that
exist within a few words of each other in the text. For example "A
larger server would be sufficient I think".

Also in the link you provided (reproduced below) the first matched
word is surrounded by 4 words and the second by 5 words, is there a
reason for this?

"An example of a larger post can be found ... we were to add a
sufficient amount of text than we ..."

Thank you.

--
Graham

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Google Style Search Results

am 09.12.2005 13:21:32 von Julien Bonastre

Yay, Questionnaire time

I love this part of the game



a) I'm not very familiar with regex at all and was wondering if you could
tell me how your regex would handle two matched search strings that
exist within a few words of each other in the text. For example "A
larger server would be sufficient I think".

Answer: As I think I may have mentioned "All I did was conjure up a regular
expression "

True, I didn't imply I wrote that regex in under 32 seconds...But I'm sure I
was trying to come across with the fact that with improvement it could be
much more powerful.

Like this example:

http://aries.the-spectrum.org/webdev/wawd/forums/search.php? q=were%2Badd&st=post&sb%5B%5D=*&maxres=25&ob=datetime&ot=DES C


Is that better??

multiple words within the same piece of string..

Again, much much much more work can be done, this was a very quick "stub"
example to show the flexibility of regex..

Now a new issue that has been presented is if you DO have multiple words
close together it will only grab x amount of words to the before and after
that central word, including perhaps another keyword.. as you can see on
above link..


Again, give me another 3 minutes in the code and I'm sure I'll work that one
too..

b)Also in the link you provided (reproduced below) the first matched
word is surrounded by 4 words and the second by 5 words, is there a
reason for this?

Answer: Ooh this is my favourite :-) Yes, great reason why when you conduct
a search such as this:
http://aries.the-spectrum.org/webdev/wawd/forums/search.php? q=sufficient%2Blarge&st=post&sb%5B%5D=*&maxres=25&ob=datetim e&ot=DESC

You received the 4 word and 5 word output.. Why don't you head over to the
link that is generated on that search result entry??

Look around at the actual content of that forum entry and you will soon see
that the first match occurs on a line that physically only has 9 words,
therefore it can only really match what exists.

Good point though, for a split second I actually thought to myself there
might be something wrong, but as usual and until I'm proved wrong; I'm right
again. PHP and REGEX have never failed me.

I'm sure you all are well aware already of the saying that describes how
there is no such thing as computer errors, only stupid humans.

And that is precisely it, I have been and still am a stupid human, and I
will usually sit there for quite a while reloading and running a regex in my
head to ensure it runs and parses as it should.

Simple ones like this don't take too much planning, but they can get hairy
:-)




Hopefully that answers your queries Graham..



Kindest Regards to everybody!

Julien Bonastre


---oOo--- Allowing users to execute CGI scripts in any directory should only
be considered if: ... a.. You have no users, and nobody ever visits your
server. ... Extracted Quote: Security Tips - Apache HTTP
Server ---oOo--- ------oOo---------------oOo------ Julien Bonastre
[The_RadiX] The-Spectrum Network CEO ABN: 64 235 749 494
julien@the-spectrum.org
www.the-spectrum.org ------oOo---------------oOo------
----- Original Message -----
From: "Graham Cossey"
To: "Julien Bonastre" ;
Sent: Friday, December 09, 2005 7:10 PM
Subject: Re: [PHP-DB] Google Style Search Results


On 12/9/05, Julien Bonastre wrote:

> http://aries.the-spectrum.org/webdev/wawd/forums/search.php? q=sufficient%2Blarge&st=post&sb%5B%5D=*&maxres=25&ob=datetim e&ot=DESC
>

>
> All I did was conjure up a regular expression that basically just matches
> words :-) haha ironically..
>
>
> Here it is:
>
> $extract_result="";
> preg_match_all("/((?:[\w]+ ?){0,5})[\w
> \.\,\-\;]((?:".join("|",$q_arr)."))([\w]*)[\w \.\,\-\;]((?:[\w]+
> ?){0,5})/i",$row["content"],$ext_matches,PREG_SET_ORDER);
> foreach($ext_matches as $ext_arr) {
> $extract_result .= $ext_arr[1]." ".$ext_arr[2]."".$ext_arr[3]."
> ".$ext_arr[4]." ... ";
> }
>
>
> Are you familiar with regex?
>


I'm not very familiar with regex at all and was wondering if you could
tell me how your regex would handle two matched search strings that
exist within a few words of each other in the text. For example "A
larger server would be sufficient I think".

Also in the link you provided (reproduced below) the first matched
word is surrounded by 4 words and the second by 5 words, is there a
reason for this?

"An example of a larger post can be found ... we were to add a
sufficient amount of text than we ..."

Thank you.

--
Graham

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Google Style Search Results

am 09.12.2005 15:42:26 von Graham Cossey

On 12/9/05, Julien Bonastre wrote:
> Yay, Questionnaire time
>
> I love this part of the game
>
>
>
> a) I'm not very familiar with regex at all and was wondering if you could
> tell me how your regex would handle two matched search strings that
> exist within a few words of each other in the text. For example "A
> larger server would be sufficient I think".
>
> Answer: As I think I may have mentioned "All I did was conjure up a regul=
ar
> expression "
>
> True, I didn't imply I wrote that regex in under 32 seconds...But I'm sur=
e I
> was trying to come across with the fact that with improvement it could be
> much more powerful.
>
> Like this example:
>
> http://aries.the-spectrum.org/webdev/wawd/forums/search.php? q=3Dwere%2Bad=
d&st=3Dpost&sb%5B%5D=3D*&maxres=3D25&ob=3Ddatetime&ot=3DDESC
>
>
> Is that better??
>
> multiple words within the same piece of string..
>
> Again, much much much more work can be done, this was a very quick "stub"
> example to show the flexibility of regex..
>
> Now a new issue that has been presented is if you DO have multiple words
> close together it will only grab x amount of words to the before and afte=
r
> that central word, including perhaps another keyword.. as you can see on
> above link..
>
>
> Again, give me another 3 minutes in the code and I'm sure I'll work that =
one
> too..
>
> b)Also in the link you provided (reproduced below) the first matched
> word is surrounded by 4 words and the second by 5 words, is there a
> reason for this?
>
> Answer: Ooh this is my favourite :-) Yes, great reason why when you condu=
ct
> a search such as this:
> http://aries.the-spectrum.org/webdev/wawd/forums/search.php? q=3Dsufficien=
t%2Blarge&st=3Dpost&sb%5B%5D=3D*&maxres=3D25&ob=3Ddatetime&o t=3DDESC
>
> You received the 4 word and 5 word output.. Why don't you head over to th=
e
> link that is generated on that search result entry??
>
> Look around at the actual content of that forum entry and you will soon s=
ee
> that the first match occurs on a line that physically only has 9 words,
> therefore it can only really match what exists.
>
> Good point though, for a split second I actually thought to myself there
> might be something wrong, but as usual and until I'm proved wrong; I'm ri=
ght
> again. PHP and REGEX have never failed me.
>
> I'm sure you all are well aware already of the saying that describes how
> there is no such thing as computer errors, only stupid humans.
>
> And that is precisely it, I have been and still am a stupid human, and I
> will usually sit there for quite a while reloading and running a regex in=
my
> head to ensure it runs and parses as it should.
>
> Simple ones like this don't take too much planning, but they can get hair=
y
> :-)
>
>
>
>
> Hopefully that answers your queries Graham..
>
>
>
> Kindest Regards to everybody!
>
> Julien Bonastre
>


Thanks for that Julien, I really must find the time to look more into Regex=
s.

--
Graham

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Re: Google Style Search Results

am 09.12.2005 16:26:43 von Julien Bonastre

------=_NextPart_000_000E_01C5FD28.C7314020
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Thats ok, sorry to have come across a bit 'narky' in that response by =
the way


I was just under some pressure at the time, I should really compose =
myself more before trying to lend a hand or some advice and head to the =
deep end in my ramblings..

haha


There really isn't much to Regex to be honest, whilst some patterns can =
look awfully complicated, and I will admit, generally you can't really =
neaten up long patterns as it just looks unreadable after wards..

For example:

// Parse input string via forum URL substitution method..
$parsedBodyStr =3D =
preg_replace("/\[URL(?:\=3D*([^\]]*))\]([^\[]*)\[\/URL\]/sie ","' HREF=3D\"'.forumFormatPostURL(\"$2\").'\" =
TARGET=3D_BLANK>'.(strlen(\"$1\") > 0 ? \"$1\" : =
\"$2\").'
'",$parsedBodyStr);
=20




It is simply a line that is designed to convert custom forum embedded =
hyperlink anchors into functional HTML standard anchors..

Whilst somewhat ugly to look at, it works 100% everytime. see my forum, =
like many other similiar class PHP forums, only allows url's to be =
entered via some custom structure: [url]http://the-spectrum.org[/url]

and as a small feature I also add the "title" parameter, [url=3DThe =
Religion of Gurus!]http://php.net[/url]

These would be respectively entered in the code when someone views that =
forum page and its messages as:
http://the-spectrum.org
and The Religion of Gurus!



Now, trying to neaten that:

// Parse input string via forum URL substitution method..
$parsedBodyStr =3D preg_replace(
"/\[URL(?:\=3D*([^\]]*))\]([^\[]*)\[\/URL\]/sie",
"' TARGET=3D_BLANK>'.(strlen(\"$1\") > 0 ? \"$1\" : \"$2\").''",
$parsedBodyStr
);
=20

Not much of an improvement.. Unfortunately you can't really go about =
entering spaces and so forth in your patterns otherwise it will render =
them unfunctional. You can go around it different ways..


I neaten my code and enhance reusability by simply conquering a =
particular pattern, and then that is just placed in a global =
$SYSTEM["REGEX_FILTER"] array which I can access later on in a shorthand =
version, keeps code legible

Particular if you are going to be using either a lot of patterns or even =
using one single pattern very often, Remember this does nothing for =
perfomance, purely asthetics only..


The easiest way to learn, just as I learnt mastering php, mysql, apache2 =
and picking up unix/bsd, c++, object pascal, and the list goes on..


Is to teach yourself.. I never paid a cent to learn php/mysql, never =
went to a single tutor/lecture/seminar etc..

Just hop on the net, you'll find tonnes of resources if you want =
examples, or better yet, invent a problem you want to solve with some =
kind of manipulation with a string, and try to code a pattern for it..


I guarantee you there will be a pattern for virtually any problem you =
could imagine needing a fix for..


I have never encountered a problem yet where a regex pattern can't pull =
me out of trouble=20


Believe this or not, but I learnt the basics of regex patterns in Perl, =
but it wasn't till I hit the PHP PCRE [Perl-Compliant Reg Exp] =
references which refer to the pattern modifiers and syntax that I really =
picked up on it.. That syntax guide along with the modifier page are =
excellent to start working off.. Very specific, short examples given for =
many different aspects.. I personally love it anyway..



Well, enjoy.. ta ta for now!


---oOo--- Allowing users to execute CGI scripts in any directory should =
only be considered if: ... a.. You have no users, and nobody ever visits =
your server. ... Extracted Quote: Security Tips - Apache HTTP Server =
---oOo--- ------oOo---------------oOo------ Julien Bonastre [The_RadiX] =
The-Spectrum Network CEO ABN: 64 235 749 494 julien@the-spectrum.org =
www.the-spectrum.org ------oOo---------------oOo------=20
----- Original Message -----=20
From: "Graham Cossey"
To: "Julien Bonastre"
Cc:
Sent: Saturday, December 10, 2005 12:42 AM
Subject: Re: [PHP-DB] Google Style Search Results


On 12/9/05, Julien Bonastre wrote:
> Yay, Questionnaire time
>
> I love this part of the game
>
>
>
> a) I'm not very familiar with regex at all and was wondering if you =
could
> tell me how your regex would handle two matched search strings that
> exist within a few words of each other in the text. For example "A
> larger server would be sufficient I think".
>
> Answer: As I think I may have mentioned "All I did was conjure up a =
regular
> expression "
>
> True, I didn't imply I wrote that regex in under 32 seconds...But I'm =
sure I
> was trying to come across with the fact that with improvement it could =
be
> much more powerful.
>
> Like this example:
>
> =
http://aries.the-spectrum.org/webdev/wawd/forums/search.php? q=3Dwere%2Bad=
d&st=3Dpost&sb%5B%5D=3D*&maxres=3D25&ob=3Ddatetime&ot=3DDESC
>
>
> Is that better??
>
> multiple words within the same piece of string..
>
> Again, much much much more work can be done, this was a very quick =
"stub"
> example to show the flexibility of regex..
>
> Now a new issue that has been presented is if you DO have multiple =
words
> close together it will only grab x amount of words to the before and =
after
> that central word, including perhaps another keyword.. as you can see =
on
> above link..
>
>
> Again, give me another 3 minutes in the code and I'm sure I'll work =
that one
> too..
>
> b)Also in the link you provided (reproduced below) the first matched
> word is surrounded by 4 words and the second by 5 words, is there a
> reason for this?
>
> Answer: Ooh this is my favourite :-) Yes, great reason why when you =
conduct
> a search such as this:
> =
http://aries.the-spectrum.org/webdev/wawd/forums/search.php? q=3Dsufficien=
t%2Blarge&st=3Dpost&sb%5B%5D=3D*&maxres=3D25&ob=3Ddatetime&o t=3DDESC
>
> You received the 4 word and 5 word output.. Why don't you head over to =
the
> link that is generated on that search result entry??
>
> Look around at the actual content of that forum entry and you will =
soon see
> that the first match occurs on a line that physically only has 9 =
words,
> therefore it can only really match what exists.
>
> Good point though, for a split second I actually thought to myself =
there
> might be something wrong, but as usual and until I'm proved wrong; I'm =
right
> again. PHP and REGEX have never failed me.
>
> I'm sure you all are well aware already of the saying that describes =
how
> there is no such thing as computer errors, only stupid humans.
>
> And that is precisely it, I have been and still am a stupid human, and =
I
> will usually sit there for quite a while reloading and running a regex =
in my
> head to ensure it runs and parses as it should.
>
> Simple ones like this don't take too much planning, but they can get =
hairy
> :-)
>
>
>
>
> Hopefully that answers your queries Graham..
>
>
>
> Kindest Regards to everybody!
>
> Julien Bonastre
>


Thanks for that Julien, I really must find the time to look more into =
Regexs.

--
Graham

------=_NextPart_000_000E_01C5FD28.C7314020--