Chris,
That is getting me the whole line. Is there a way to just pull out the table name? Thanks, Craigbert ________________________________ From: Chris Porter [mailto:[email protected]] Sent: Friday, November 05, 2010 8:24 AM To: [email protected]; Craig Boyd Subject: Re: Regex for DDL assuming that the entire string including carriage returns is being looked at, this should solve your problem. the [\r\n]* is important because it captures both unix linebreaks and windows linebreaks if they exist. /create table\s+(.*?)[\r\n]*\(/ good luck! -Chris On Fri, Nov 5, 2010 at 9:16 AM, Craig Boyd <[email protected]> wrote: Hello All, I can do basic regex, but this one has me stumped. I need to extract the table name from a DDL statement. Generally, when creating a table the statement looks like this: CREATE TABLE CUSTOMER ( FLD1... ); The problem I am having is that sometimes the open paren is on the next line down. It varies from tool to tool how this stuff is formatted. How do I pull out the table name, in this case CUSTOMER, no matter where the open paren is? Thanks, Craigbert </pre><font face="monospace"size="-3"><br>The information transmitted is intended only for the person or entity to which it is addressed and <br>may contain confidential and/or privileged material. If the reader of this message is not the intended<br>recipient, you are hereby notified that your access is unauthorized, and any review, dissemination,<br>distribution or copying of this message including any attachments is strictly prohibited. If you are not<br>the intended recipient, please contact the sender and delete the material from any computer.<br><pre> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/regex/message.cfm/messageid:1244 Subscription: http://www.houseoffusion.com/groups/regex/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/regex/unsubscribe.cfm
