erase exacly lines
-
@Thomas-Knoefel i can’t understand, please translate pt-br.
EXAMPLE:
Line 195: CC > 4984232072383368|10|21|904 Line 222: CC > 4107490266557443|10|24|386 Line 249: CC > 5232841057588036|11|23|830 Line 276: CC > 4824251936976112|12|23|021 Line 301: CC > 5502097671724563|03|29|479 Line 326: CC > 4984427471168531|11|21|287 Line 351: CC > 5502097748676291|11|27|742 Line 376: CC > 5234210221782396|12|26|416 Line 401: CC > 4392674069194918|08|29|845 Line 426: CC > 6062824329262377|01|26|473
I WANT:
4392674069194918|08|29|845
remove this =
-
@Thomas-Knoefel it worked thank you, please close the post
-
Hello, @altevir-gomes, @terry-r, @thomas-knoefel and All,
@altevir-gomes, I suspect that you get the data from the Notepad++
Search Results
panel ! if so, I think that the correct regex S/R should be :-
SEARCH
(?-si)^\tLine.+>\x20
-
REPLACE
Leave EMPTY
Now, if you previousy extract this data on a new tab and deleted the leading
TAB
character, this regex becomes :-
SEARCH
(?-si)^Line.+>\x20
-
REPLACE
Leave EMPTY
And, of course, use the
Regular expression
search mode !Best Regards,
guy038
-
-
@Thomas-Knoefel i have another question
EXAMPLE:
LIVE | 07934954409|carol123 - EMAIL: ericaveras@bol.com.br - #MaxCenter
LIVE | 31083380800|pizetta1 - EMAIL: isaias.pizetta@bol.com.br - #MaxCenter
LIVE | 45925437500|gel0473 - EMAIL: rogerdolar@bol.com.br - #MaxCenter
LIVE | 95304185072|saimon18 - EMAIL: dilcelene@bol.com.br - #MaxCenter
LIVE | 11578698820|r200700 - EMAIL: darsie@bol.com.br - #MaxCenter
LIVE | 04543429699|180808re - EMAIL: xavierprojetos@bol.com.br - #MaxCentI WANT ONLY:
04543429699|180808re
11578698820|r200700
95304185072|saimon18
95304185072|saimon18
45925437500|gel0473ID = have a default 11 numbers
PASS = random pass’sID/PASS
-
Hi, @altevir-gomes, @terry-r, @thomas-knoefel and All,
I suppose that this regex S/R :
SEARCH
(?-is).+(?<=\|\x20)(.+)(?=\x20-\x20EMAIL:).+
REPLACE
\1
Should work, as you expect to !
BR
guy038
-
@Altevir-Gomes said in erase exacly lines:
it worked thank you, please close the post
This forum doesn’t “close posts” or “mark posts as solved”. It’s for discussion, so people can keep replying with new ideas or tangential thoughts even after your original request has been solved.
—
Also, since no one has mentioned any of the following yet:
Useful References
-
And before you say this yet again:
i have another question
Please try and study what you’ve already been given along with the references provided, and try to solve your own problems of this sort. Sure, if you have trouble, post back here, but be prepared to show you have at least made an effort first.
-
@guy038 WORKED TOO, you are a genius, thx <3
i’m from brazil sorry for my bad english
-
@guy038 hey guy, please can help me again? i have other question
THIS:
Registro : 13
Itau S/A - Gold
Cartão : 5484740469100643
Validade : 04/2027
Cod. Segurança : 676
SENHA DO CARTÃO : 2572
Portador : Valdir Nogueira da Silva
CPF : 219.729.403-25
e-mail : valdirbm2013@yahoo.com
senha : bombeiro
endereço : Rua 60
número : 342
bairro : Jereissati II
cidade : Maracanaú
estado : CE
cep : 61901-240
data : 06/06/2020 10:03I WANT ONLY THIS
5484740469100643|04|2027|676
-
@Altevir-Gomes said in erase exacly lines:
please can help me again?
What have you tried on your own first?
This isn’t a data transformation service where you just get free, no effort (expended by you) help, over and over again. -
Hi, @altevir-gomes, @terry-r, @thomas-knoefel, @alan-kilborn and All,
For the last time, I’m going to give you the right regex S/R to use. But, frankly, you would better off spending some spare time to learn the basic regex features !
Refer to the link below for further information :
So, starting from your INPUT text :
Registro : 13 Itau S/A - Gold Cartão : 5484740469100643 Validade : 04/2027 Cod. Segurança : 676 SENHA DO CARTÃO : 2572 Portador : Valdir Nogueira da Silva CPF : 219.729.403-25 e-mail : valdirbm2013@yahoo.com senha : bombeiro endereço : Rua 60 número : 342 bairro : Jereissati II cidade : Maracanaú estado : CE cep : 61901-240 data : 06/06/2020 10:03
If you use the following regex S/R :
SEARCH
(?-si)^Registro(?s:.+?)Cartão : (.+)\RValidade : (.+)/(.+)\RCod. Segurança : (.+)(?s:.+?)^data.+(\R\R)
REPLACE
\1|\2|\3|\4\5
You should get your expected OUTPUT text :
5484740469100643|04|2027|676
Note that I suppose that each block of text is always separated with a line-break !
Now, some quick hints about the search and replace regexes. I’ll use the
free-spacing
mode for better visibilitySEARCH (?x-si) ^ Registro (?s: .+? ) Cartão [ ]:[ ] (.+) \R Validade [ ]:[ ] (.+) / (.+) \R Cod \.[ ] Segurança[ ]:[ ] (.+) \R (?s: .+? ) ^ data .+? ( \R\R ) <---FIRST TWO lines ----> <---- THIRD line ----> <-------- FOURTH line --------> <---------- FIFTH line ----------> < OTHERS > <-- LAST line --> REPLACE \1|\2|\3|\4\5 \1 represents the 'Card' number AFTER the 'Cartão' string \2 and \3 represent the 'Month' and the 'Year' numbers AFTER the 'Validade' string \4 represent the 'Security' number AFTER the 'Cod. Segurança' string \5 represents the TWO line-breaks at the END ( the one after the LAST line and the EMPTY NEXT one )
Best Regards,
guy038
-
@guy038 not work to me, but thx.
its very hard to learn REGEX i don’t speak english.
-
@Altevir-Gomes If you feel your English in not good enough, you can still learn Expressões Regulares (Em Portuguese do Brasil)" studying the following book:
https://www.piazinho.com.br/#download
The book dedicates a few pages to Notepad++ in chapter 6.