hi, firstly, that's not a regexp, it's a simple concatenation ( the . operator 'glues' two strings together - try http://japh.nu/index.cgi?base=data_types for a tutorial that mentions this )
secondly, to answer the "\', \'"-question: it's simply a quoted string not much unlike "foo", but iwth the difference that the author of this code is tryign to escape the ' (with a \) and glueing in a comma probably to produce and SQL statement like this: "INSERT INTO log (foo, bar, bleh) values ('quux', 'fubar', 'elmo'); now, let me remark 2 things: 1. the way this query is written is not too good to say the least (confusing code with a few (minor) errors/incostencies in it) 2. when talking to databases, PLEASE ALWAYS use the DBI module you can get it from CPAN (search.cpan.org). hth, Jos > Hi all, > i am trying to understand this regex that is supposed to make an > insert into a mysql log. specificlly my questions are: > 1. what are the "." (periods) doing? > 2. in the string "\', \'" what is the ","(comma) doing > ========================================================================== > $query = "INSERT INTO log " > . "(datein, spool, mfrom, msize, mclass, mpri, nrcpts, " > . "inrelay, complete) VALUES (\'" > . $datein . "\', \'" > . $spool . "\', \'" > . $from . "\', \'" > . $size . "\', \'" > . $class . "\', \'" > . $pri . "\', \'" > . $nrcpts . "\', \'" > . $relay . "\', \'" > . '' . "\')"; > if (0 < $DEBUG) { print "INFO: Line " . __LINE__ . " " . $query; } > > ============================================================================ > thanks alot for any help you can offer. > > -- > - josh > N8MSO > > 20A8 2FC6 9099 D215 78F4 D005 B9F3 21C4 300C C25E ~. .~ Tk Open Systems > =}------------------------------------------------ooO--U--Ooo------------{= > - [EMAIL PROTECTED] - tel: +972.58.520.636, http://www.tkos.co.il > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]