-
First of all, thanks for filling a real need with this plugin, and also doing it about as straightforwardly as possible. I cannot get it to work yet, but I feel I must be missing something obvious. Whenever I try to apply a pattern, either to the "whole document" or "whole lines" or "selection", all that seems to happen is that the entire document is selected. Tried with my own pattern as well as the Cleanup pattern in the examples. (By the way, it took me a minute to realize the import and export work on "all the patterns" instead of a single pattern and I successfully imported after making it into an array of one pattern. There is probably a feature request in there somewhere, but I digress.) Here is my original pattern I am trying to use (I copied and pasted from my YouTube Watch Later page) - arrayified, i.e. I removed the Cleanup pattern I imported: [
{
"name": "Clean YouTube Playlist Paste",
"rules": [
{
"from": "^\\].*$",
"to": "",
"caseInsensitive": false,
"global": true,
"multiline": false,
"sticky": false,
"disabled": false
},
{
"from": "^•?\\s+$",
"to": "",
"caseInsensitive": false,
"global": true,
"multiline": false,
"sticky": false,
"disabled": false
}
],
"collapsed": false,
"cursorRegexStart": "$",
"cursorRegexEnd": "^"
}
] Its intended purpose is to remove redundant lines that happen to start with ], and also blank lines and lines with literal bullet symbols on otherwise blank lines. As mentioned before though, I have the same issue with the imported pattern as well. Copied from debug info. in the sandbox, where I have the same issue. I am actually running Windows 11.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I figured it out. I didn't realize I needed the multiline toggle for the rules. Most of my regex use is done in Notepad++, I guess it defaults to multiline. I will look at the imported one as well, I notice some of its rules are multiline and some are not, so I assume it is a similar issue. |
Beta Was this translation helpful? Give feedback.
I figured it out. I didn't realize I needed the multiline toggle for the rules. Most of my regex use is done in Notepad++, I guess it defaults to multiline. I will look at the imported one as well, I notice some of its rules are multiline and some are not, so I assume it is a similar issue.