Re: [PHP] Re: Regex Help

2004-01-27 Thread karthikeyan.balasubramanian
Hi Ben,

  Your code works but If i remove the delimter [] which
I gave so that you could capture the data which needs to be
picked it doesnt work?.  Any help?

Karthikeyan B
- Original Message -
From: Ben Ramsey [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; Karthikeyan
[EMAIL PROTECTED]
Sent: Monday, January 26, 2004 11:56 PM
Subject: [PHP] Re: Regex Help


 Check the PHP manual for preg_match()
 (http://us3.php.net/manual/en/function.preg-match.php).

 I did play around with it a little bit, and I think I've got a starting
 point for you to work with.  Try out this code and then play around with
 it to get the results you need.  $matches[2][0] will hold the full line
 for Mayberry Mob.  You could then just use the substr() function to pull
 the data from that line.

 The code is, as follows:

 $subject = 
 =
 NF [1/21/04] E Race 11 Grade B [5-16] Going F

 U Too Tipsy  60½ 2 1 1 1   1 1   1 ½  30.46   4.40  Held Firm
Inside

 Dream Away   62  8 2 3 2   3 2 ½  30.51   17.90 Up For Plc
Mdtk

 Pounce N Bounce  70  5 4 2 1   2 3 2  30.58   4.50  Held Show
Inside

 Oneco Conor  67½ 7 8 4 5   4 4 2  30.60   6.90  Evenly Inside

 Krazy Kirk   70  4 3 6 7   5 5 5  30.79 * 1.90  Varied
 Little Mdtrk

 Mayberry Mob 73½ 1 6 5 6   6 6 10 31.15   5.30  Never
 Prominent Ins

 Jw Alley's Wish  60  3 7 8 9   7 7 10 31.17   6.50  No Factor
Mdtrk

 Rooftop Comet56  6 5 7 8   8 8 19 31.79   21.80 Never In It
Mdtk
 
 ;
 $pattern = /\[(\d+\/\d+\/\d+|\d+\-\d+)\]|(Mayberry Mob.*)/;
 if (preg_match_all($pattern, $subject, $matches, PREG_SET_ORDER)) {
 print_r($matches);
 } else {
 echo no match.;
 }

 Hope that helps!



 Karthikeyan wrote:

  Sorry last time I forgot to put subject on my mail.  So here
  I am putting appropriate subject and sending it.
 
  Hi All,
 
Just wondering if somebody can help me with this small regex search.
  The information I wanted to capture is the one in the Square Bracket.
  i.e Date : 1/21/04, Race Type: 5-16, Dog Position: 6(Mayberry Mob)
 
  =
  NF [1/21/04] E Race 11 Grade B [5-16] Going F
 
  U Too Tipsy  60½ 2 1 1 1   1 1   1 ½  30.46   4.40  Held Firm
  Inside
 
  Dream Away   62  8 2 3 2   3 2 ½  30.51   17.90 Up For Plc
Mdtk
 
  Pounce N Bounce  70  5 4 2 1   2 3 2  30.58   4.50  Held Show
  Inside
 
  Oneco Conor  67½ 7 8 4 5   4 4 2  30.60   6.90  Evenly
Inside
 
  Krazy Kirk   70  4 3 6 7   5 5 5  30.79 * 1.90  Varied
  Little Mdtrk
 
  [Mayberry Mob] 73½ 1 6 5 6   6 6 10 31.15   5.30  Never
  Prominent Ins
 
  Jw Alley's Wish  60  3 7 8 9   7 7 10 31.17   6.50  No Factor
Mdtrk
 
  Rooftop Comet56  6 5 7 8   8 8 19 31.79   21.80 Never In It
  Mdtk
  
 
  Looking forward to hear some response.
 
  Have a great day.
 
  Karthikeyan B
 

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



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



[PHP] Replication Rollback

2003-12-29 Thread karthikeyan.balasubramanian
Hi,

  I posted this question in MySQL mailing list and go no reply.  Since
PHP is so close to MySQL.  I am posting this question here.

The basic problem is that I have committed the transaction and then
replicated to another DB. Now I want to rollback the committed transaction.
Is there a way to rollback to a particular point. This requirement is very
similar to rolling back using save points. I guess an option would be to
backup database before changes and restore it if the user is not satisfied
with the changes he has made. One transaction in my application would affect
6-8 tables with at least 50 - 100 records getting inserted/updated or
deleted.

Please advice

Karthikeyan B

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



[PHP] Question on PHP

2003-02-06 Thread karthikeyan.balasubramanian
Hi,

  I would like put this question directly to Rasmus creator of this
wonderful server side scripting language.

  Is there a possibility with the future release of PHP to add extension in
a easier manner.  For every feature client wants there is a recompile
involved.

  Wouldn't this be much easier if we just compile the appropriate library
and just point the directory through php.ini.

  In that way most of the hosting provider would have update to date
version.

  I also like features of gefionsoftware's LiteWebServer wherein they
provide an admin screen and it allows us to update to the latest version
without
pain.

  Here I am talking about both upgrading to latest version as well as adding
extensions.

  Have a great day.

Karthikeyan B



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




[PHP] PHP Framework

2003-02-03 Thread karthikeyan.balasubramanian
Hi All,

  I finally decided to upgrade my PHP.  Just want to know your thoughts on
which Framework is the best with a clear seperation of content from
presentation.

  Please let me know which do you think is the best and why?

  Have a great day.

Karthikeyan.



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




[PHP] PHP3 Web Architecture Framework

2003-02-01 Thread karthikeyan.balasubramanian
Hi,

  I browsed the web for many different web architecture and frameworks.  I
found many Interesting but all wants latest version of PHP at least PHP
4.0.6.  I dont want to upgrade the PHP Version(4.0.5) that i have because
many clients are using it and i dont want to mess it up.  Its a Pain in PHP
that to support any extension we need to recompile with appropriate
extensions unlike Java where all you need to do is put the appropriate Jar
files in the /Lib directory and it automatically gets SET in the classpath
and works great but I do ADORE PHP for its ease and efficiency and ofcourse
along with Apache it rocks.  So please dont suggest me to upgrade my PHP or
something other.

  Few of the techniques i was pretty impressed is

  1) Smarty - which ofcourse says that it needs PHP 4.0.6 or higher for its
latest release
  2) Tadpole PHPTags  - which ofcourse didnt work on PHP4.0.5
  3) Pear which ofcourse needed recompilation with Pear support
  4) PHPMVC but it also requires latest version of PHP

  What i m planning to do is follow PHP3 method of Coding.  The version of
PHP that i have is 4.0.5.  Can somebody suggest Struts like framework for
PHP3 type of coding.

  Hope i do make sense if not please comment.  I will explain more.

  Have a great day.

Karthikeyan.



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