[nyphp-talk] Some Links From NYPHP-Live

2006-11-28 Thread Hans Zaunere
All, Here are some randomly useful links that we're talking about at the meeting (sorry for the cross-post): MySQL Fulltext Indexing http://dev.mysql.com/tech-resources/articles/full-text-revealed.html http://dev.mysql.com/doc/refman/5.0/en/fulltext-fine-tuning.html Packaged AMP On Windows/Linu

Re: [nyphp-talk] Question about REGEX's...

2006-11-28 Thread Greg Rundlett
One nice 'trick' in using regex to match code is to use another delimiter character bessides '/' since it is so commonly found in the 'needle' pattern. Other 'common' delimiters are % or #. e.g. instead of preg_match('/needle/imUs', $haystack); do this preg_match('#needle#imUs', $haystack); Usi

Re: [nyphp-talk] Question about REGEX's...

2006-11-28 Thread Anirudh Zala
You are violating 2 rules here of how to use regular expressions. #1 Regular expressions always needs 2 arguments. 1: Pattern to be matched and 2: String in which defined pattern is to be matched. Here you missed 2nd arguments that is why parser gives ) => / error. #2 Quote (double or single) i

Re: [nyphp-talk] Question about REGEX's...

2006-11-28 Thread Mark Armendariz
Is it returning everything between that first div and the last on the page? If so, it's being 'greedy'. Basically that .+? is matching everything (including interior 's). You can use the 'Ungreedy' modifier 'U' (captial u after the final slash) or make your regex between the divs more specific

Re: [nyphp-talk] Question about REGEX's...

2006-11-28 Thread Chris Merlo
On 11/28/06, Anthony Papillion <[EMAIL PROTECTED]> wrote: Hello Everyone, I am using the following regex to retrieve text between two tags. $trans_text = preg_match(/(.+?)/); Don't you need to surround the pattern in quotes? I always have. -c _

Re: [nyphp-talk] Question about REGEX's...

2006-11-28 Thread Anthony Papillion
Thanks for the help...that worked. But, for some reason, the entire regex breaks down now. While I don't get an error, it seems to not be working as I get the entire text. Is my syntaxt wrong? Thanks, Anthony - Original Message - From: Paul Houle To: NYPHP Talk Sent: Tuesday, Novemb

Re: [nyphp-talk] Question about REGEX's...

2006-11-28 Thread Paul Houle
Anthony Papillion wrote: Hello Everyone, I am using the following regex to retrieve text between two tags. $trans_text = preg_match(/(.+?)/); However, the parser keeps telling me it expects a ) but found / instead. What am I doing wrong? It's probably the / in /div. Try ...<\/div>/

[nyphp-talk] Question about REGEX's...

2006-11-28 Thread Anthony Papillion
Hello Everyone, I am using the following regex to retrieve text between two tags. $trans_text = preg_match(/(.+?)/); However, the parser keeps telling me it expects a ) but found / instead. What am I doing wrong? Can anyone please help a regex newbie in his quest? lol Thanks, Anthony__