bulk remove row tag
Hi, how can i remove a lot rows with this tag?
<category domain=“post_tag” … </category>
from a file xml
what’s the syntax for variable texts? into search box
You don’t tell us, in your post, if you prefer :
(A) Remove all lines containing, exactly, the string
(B) Remove the string
^<category domain="post_tag"......</category>from all the lines, containing that string
(C) Remove ANY line, containing the string
<category domain="post_tag"......</category>, as the line, below :
Some possible text BEFORE <category domain="post_tag" .........</category> Some possible text AFTER
Anyway, there’s a solution, with a search regular expression, for each of them :-) Note that, for any of them, the replacement zone must be EMPTY!
For case (A), use the search regex
For case (B), use the search regex
For case (C), use the search regex
Of course, the Regular expression search mode must have been set, previously
These 3 regexes begin with the in-line modifiers
(?-is)which ensures you that the search is done, in a sensitive way and that the dot
.meta-character will match standard characters, only !
As usual, the
\Rsyntax is a shortened form for matching any kind of EOL characters (
In the first case, the string
<category domain="post_tag" … </category>is bounded to beginning of line
^and to its EOL characters, which have to be taken in account, to delete the complete line
In the third case, the string
<category domain="post_tag" … </category>is preceded, from beginning of line, by any range, even null, of standard characters and followed by any range, too, even null, of standard characters, then generally followed by its EOL characters,
\Rmeans 0 or 1 time the EOL character(s) , just in case the very last line which would end, without any EOL character !
In all cases, the search match is removed, because there’s NO replacement regex !
i must remove all the rows where there is the category’s tag.
Because there are thousands of lines style:
<category domain=“post_tag” nicename=“ambiente”><![CDATA[Ambiente]]></category>
but the “domain” must be “post_tag” , there are other values for “domain” that don’t must be removed.
ps: I apologize for my english
From what you said, I think that my solution (C) does exactly what you would like to !
Indeed, any line, which contains the domain attribute, with a value different from the string post_tag, will NOT be removed :-)