K
Kyle
Hello, I am trying to replace all incidences of (Pattern1) NOT
immediately followed by (Pattern2) with ReplaceText. Is there any way
this can be done with RegExps? I can't figure it out.
What I've got is a log file where the first characters of every row is
a datetime stamp in a fixed format. However, each line of the log file
contains SQL and every now and then the SQL itself contains a line
break, which is making programmatically loading the log file into a
database difficult.
So, I'd like to replace all instances of \r\n not immediately followed
by a timestamp with a space.
I can replace all {\r\n followed by a timestamp} with {some other
special character followed by the timestamp}, and then replace all
{\r\n} with {space}, and then replace {special character} with {\r\n}.
But this is wildly inefficient considering these files have millions of
rows and I'd be replacing millions of instances then dozens of
instances then millions of instances, whereas I'd like to just do a
single replacement of dozens of instances.
immediately followed by (Pattern2) with ReplaceText. Is there any way
this can be done with RegExps? I can't figure it out.
What I've got is a log file where the first characters of every row is
a datetime stamp in a fixed format. However, each line of the log file
contains SQL and every now and then the SQL itself contains a line
break, which is making programmatically loading the log file into a
database difficult.
So, I'd like to replace all instances of \r\n not immediately followed
by a timestamp with a space.
I can replace all {\r\n followed by a timestamp} with {some other
special character followed by the timestamp}, and then replace all
{\r\n} with {space}, and then replace {special character} with {\r\n}.
But this is wildly inefficient considering these files have millions of
rows and I'd be replacing millions of instances then dozens of
instances then millions of instances, whereas I'd like to just do a
single replacement of dozens of instances.