I need to retain the outer quotes and only add the single quote if it exists in the field. For instance...
Not here: 'kernel: mtrr: Serverworks LE detected. Write-combining disabled.' But here: 'modprobe: modprobe: Can't locate module char-major-10-134' I hope that makes it alittle clearer than mud :) -----Original Message----- From: Timothy Johnson [mailto:[EMAIL PROTECTED] Sent: Monday, November 07, 2005 12:57 PM To: Fontenot, Ward P. Cc: beginners@perl.org Subject: RE: Regex What about stripping the outer quotes using Perl and then using $dbh->quote? My concern is that if you try to use a regex it will end up being more complicated than necessary if you try to factor in all of the possibilities. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, November 07, 2005 11:48 AM To: Timothy Johnson Cc: beginners@perl.org Subject: RE: Regex Yes they are -----Original Message----- From: Timothy Johnson [mailto:[EMAIL PROTECTED] Sent: Monday, November 07, 2005 12:46 PM To: Fontenot, Ward P. Subject: RE: Regex Are the outer quotes part of the field? -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, November 07, 2005 11:43 AM To: Timothy Johnson Subject: RE: Regex No, there has been nothing I can do with the DBI to handle that single quote in the middle of that field. I've tried everything so know I will just have Perl add a single quote at that point and Oracle will no longer choke on it. -----Original Message----- From: Timothy Johnson [mailto:[EMAIL PROTECTED] Sent: Monday, November 07, 2005 12:40 PM To: Fontenot, Ward P.; beginners@perl.org Subject: RE: Regex If you are using DBI, there is a $dbh->quote() method that will do what you want. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Monday, November 07, 2005 11:34 AM To: beginners@perl.org Subject: Regex I have a field that looks like this: 'modprobe: modprobe: Can't locate module char-major-10-134' I need to add a single quote so that it looks like this: 'modprobe: modprobe: Can''t locate module char-major-10-134' But I have no idea how to go about doing that, can I get an example? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>
smime.p7s
Description: S/MIME cryptographic signature