For example, I have the text below and want to remove the blank lines:
Logout |
Pending Approval
Supply Chain Approval Step
Request Number idM AR_0089124
Requester Data
Remove Blank Line/Rows
Moderators: AmigoJack, bbadmin, helios, MudGuard
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
Search for: \n\n
Replace with: \n
Use the following settings:
-----------------------------------------
[X] Regular expression
Replace All
-----------------------------------------
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
-----------------------------------------
Replace with: \n
Use the following settings:
-----------------------------------------
[X] Regular expression
Replace All
-----------------------------------------
Configure | Preferences | Editor
[X] Use POSIX regular expression syntax
-----------------------------------------
Hope this was helpful.............good luck,
Bob
Bob
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
Can't tell you why, but the TextPad version of RegEx does not support multiple lines unless they are explicitly entered, ie: \n\n\n
So, to handle multiple lines it works to replace "\n" with something else that may not show up. I use the tilde "~".
Make the changes that are needed.
Then go back and replace "~" with "\n"
So, to handle multiple lines it works to replace "\n" with something else that may not show up. I use the tilde "~".
Make the changes that are needed.
Then go back and replace "~" with "\n"
Hope this was helpful.............good luck,
Bob
Bob
My guess is:Bob Hansen wrote:Can't tell you why, but the TextPad version of RegEx does not support multiple lines unless they are explicitly entered, ie: \n\n\n
Textpad splits the given Regex at the \n.
It then applies the first part to a line.
If it matches, it applies the second part against the next line.
If it matches, it applies the third part to the next line.
And so on.
This would explain why quantifiers can't be applied to \n, why \n can't appear between \n, and why backreferences don't work across lines.
- Bob Hansen
- Posts: 1516
- Joined: Sun Mar 02, 2003 8:15 pm
- Location: Salem, NH
- Contact:
MudGuard's guess is a good explanation of how it is currently working.
But he and I are just an end users like yourself. You will need to have someone from Helios explain why they made that choice years ago, and why they have not changed it. All we can do right now is work with it as best we can.
But he and I are just an end users like yourself. You will need to have someone from Helios explain why they made that choice years ago, and why they have not changed it. All we can do right now is work with it as best we can.
Hope this was helpful.............good luck,
Bob
Bob