Hi guys, I get this when ever i try using \n in a RE. Not supprising given the text of the error that comes up. Any rate it seems that (looking at these posts) thier is a lot of use of \n in RE so. What is up with my use of it. It even mentiones it in the help file, though it does indicate it can not be used with Repetition Operators at any rate I also tried it with Interval Operators and got the same error. basicly if \n occurs anyware that is that. This would be a very nice feature to have when looking through log files that include a javaStackTrace as the useful content is over multipul lines. At any rate any one got any ideas? this is the RE I have just tried to use.
^2007-08-20 09:[45][0-9]:[0-9]{2},[0-9]{3}.*(WARN|ERROR).*\[WebSphere t=(009b5b00|009aee88)\]IBM:PMR:14307,370,000.*\n{0,40}.*end IBM:PMR:14307,370,000$
Cannot search files for a regular expression including '\n'
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
Actually you can use TextPad RegEx using \n in a Search.
But you have to use them explicitly, and not as a count such as {2,5}.
Searching for \n\n\n for example witll find three blank lines.
Search for ^.+\n\n will find a line of text followed by a blank line.
Try changing your search from this: \n{0,40}
To this: \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
(I believe there is a count of 40 there)
But you have to use them explicitly, and not as a count such as {2,5}.
Searching for \n\n\n for example witll find three blank lines.
Search for ^.+\n\n will find a line of text followed by a blank line.
Try changing your search from this: \n{0,40}
To this: \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
(I believe there is a count of 40 there)
Hope this was helpful.............good luck,
Bob
Bob