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:papomo@me.com |
0.1230.209 | P_45 = 009 | firstname = val | day = 15 | Happy Birthday = | city = California | country = USA | client number = | tuition number = 8907 | email: |
to
0.0.0.209 | firstname = johnny | Happy Birthday = 15-02-1990 | client number = 890 | email:papomo@me.com |
0.1230.209 | P_2 = 009 | firstname = val | day = 15 | Happy Birthday = | city = California | country = USA | tuition number = 8907 |
-
@zyllycarmy
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 removedBut 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
Find What:([^|]+?= \|)|\h*email: \|
Replace With:<empty field>
<—nothing in this fieldIt 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 byemail:
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.
Terry
-
Your example doesn’t really make sense…
P_45
in the before text changes toP_2
in 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