Page 1 of 1
remove info in lines beginning with 65
Posted: Mon Jun 06, 2011 5:59 am
by jan-01
Hello
I must remove numbers and the notes of exclamation, in lines beginning with '65' in lots of records...
Is it possible to make an regular expression to do this ?
old record...
4701 mc
4900 01-06-11 18:57:48.000
6501 !333331370!Jamaica
6502 !33334166X!Russia
6503 !333372891!Dutch
7001 31-05-11 : zmcapxl
7100 M 2011 A 1616 \ c
new record...
4701 mc
4900 01-06-11 18:57:48.000
6501 Jamaica
6502 Russia
6503 Dutch
7001 31-05-11 : zmcapxl
7100 M 2011 A 1616 \ c
Thanks for helping,
Jan
Posted: Mon Jun 06, 2011 6:37 am
by ak47wong
Enable POSIX regular expression syntax in Configure > Preferences > Editor.
Then perform this Replace operation:
Find what: ^(65.*_)!.*!(.*) [replace the underscore with a space]
Replace with: \1\2
[X] Regular expression
Click Replace All
Posted: Mon Jun 06, 2011 9:01 am
by jan-01
thanks!!
remove text after the last note of exclamation
Posted: Wed Nov 09, 2011 11:02 am
by Nico
Hello ak47/wong,
No I must remove all text after the last note of exclamation, in all lines,
Is it possible to make an regular expression to do this ?
old record...
4701 mc
3011 Theresa W.@Devasahayam!337826528!Theresa W. Devasahayam
4900 01-06-11 18:57:48.000
6501 !333331370!Jamaica
6502 !33334166X!Russia
6503 !333372891!Dutch
7001 31-05-11 : zmcapxl
7100 M 2011 A 1616 \ c
new record...
4701 mc
4900 01-06-11 18:57:48.000
3011 Theresa W.@Devasahayam!337826528!
6501 !333331370!
6502 !33334166X!
6503 !333372891!
7001 31-05-11 : zmcapxl
7100 M 2011 A 1616 \ c
Thanks for helping,
Jan
Posted: Wed Nov 09, 2011 12:33 pm
by ak47wong
Since this was addressed to me, I guess I'm responsible for answering it...
Find what: (.*!).*
Replace with: \1
Posted: Wed Nov 09, 2011 4:11 pm
by Nico
Hello ak47wong,
Thanks again! I wanted to type 'now I must...' instead of 'no I must...'
I tried to 'manipulate' your first answer at my first question
Find what: ^(65.*_)!.*!(.*) [replace the underscore with a space]
Replace with: \1\2
[X] Regular expression
Click Replace All
But without succes
(.*!).*
\1
Works for me,I'm very grateful
Greetings from the netherlands