I have a regex that is going to end up being a bit long and it’d make it much easier to read to have it across multiple lines.
I tried this but it just barfs.
preg_match( '^J[0-9]{7}:\s+ (.*?) #Extract the Transaction Start Date msg \s+J[0-9]{7}:\s+Project\sname:\s+ (.*?) #Extract the Project Name \s+J[0-9]{7}:\s+Job\sname:\s+ (.*?) #Extract the Job Name \s+J[0-9]{7}:\s+', $this->getResultVar('FullMessage'), $atmp );
Is there are way to pass a regex in the above form to preg_match?
You can use the extended syntax: