Delete empty fields with notepad
hello guys, I appeal to you, how could I eliminate those empty fields with notepad
0.0.0.206 | P_01 = | firstname = johnny | day = | Happy Birthday = 15-02-1990 | city = | country = | client number = 890 | tuition number = | email:firstname.lastname@example.org |
0.1230.209 | P_45 = 009 | firstname = val | day = 15 | Happy Birthday = | city = California | country = USA | client number = | tuition number = 8907 | email: |
0.0.0.209 | firstname = johnny | Happy Birthday = 15-02-1990 | client number = 890 | email:email@example.com |
0.1230.209 | P_2 = 009 | firstname = val | day = 15 | Happy Birthday = | city = California | country = USA | tuition number = 8907 |
I think your example went a bit awry as the results don’t exactly match the originals.i.e.
0.0.0.206 becomes 0.0.0.209
P_45 = 009 becomes P_2 = 009
Happy Birthday = remains where your request was for this to be removed
But if I read your request correctly you want any field having no data after the “=” sign is to be removed. Also any email field without an actual email address is also to be removed.
So my regex (regular expression) is
([^|]+?= \|)|\h*email: \|
<empty field><—nothing in this field
It will grab characters so long as a
|is not found and followed by the
=sign, a space and the
|character. Alternatively it will find a space (optional, 0 or 1) followed by
email:and another space and then the
|character, thus no actual email address.
See if this helps you. Come back to us regardless and let us know how you went and if you need further help.
The regex needs the Replace function set as ‘regular expression’ search mode and have the ‘wrap around’ ticked.
Your example doesn’t really make sense…
P_45in the before text changes to
P_2in the after text, although that doesn’t fit the classification of “eliminate those empty fields”. And your IP address changes. And…
Happy Birthday =remains in the after text although one would think it should be eliminated by the specification.
Excuse me, happy birthday should not be in the second line because it is empty without any data
0.1230.209 | P_2 = 009 | firstname = val | day = 15 | city = California | country = USA | tuition number = 8907 |
thank you very much helped me, sorry for the error, is that I’m with my baby taking care of it and working at the same time, solve the problem, thank you very much