Replace lines that have no digits with some constant word [closed]

Multi tool use
I have a file with about 10000 lines like the examples shown below.
I need to replace the lines that do not contain any digits
with some word; e.g., input
.
How I can do this please?
Example:
The list I have is like this:
1234561
Winstead
Adesuwa1985
Trinity
Angela41
Anita
Tracey
sdojsodsd
I want results like this, where the lines that do not have any number
are replaced with the word “input
”:
1234561
input
Adesuwa1985
input
Angela41
input
input
input
linux windows command-line notepad++ text-editing
closed as unclear what you're asking by Scott, fixer1234, Tetsujin, harrymc, Toto Feb 2 at 10:41
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
|
show 2 more comments
I have a file with about 10000 lines like the examples shown below.
I need to replace the lines that do not contain any digits
with some word; e.g., input
.
How I can do this please?
Example:
The list I have is like this:
1234561
Winstead
Adesuwa1985
Trinity
Angela41
Anita
Tracey
sdojsodsd
I want results like this, where the lines that do not have any number
are replaced with the word “input
”:
1234561
input
Adesuwa1985
input
Angela41
input
input
input
linux windows command-line notepad++ text-editing
closed as unclear what you're asking by Scott, fixer1234, Tetsujin, harrymc, Toto Feb 2 at 10:41
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
4
(1) Rather than (just) give 19 examples of what data you have, it would be better if you gave six to eight examples of what you have and what result you want. (2) This sounds like a fairly trivial (easy) problem. What research have you done? What have you learned? What have you tried? … … … … … … … … … … … … Please do not respond in comments; edit your question to make it clearer and more complete.
– Scott
Feb 2 at 2:22
2
you are casting a broad net with your tags. Linux and windows? can you be more specific?
– glenn jackman
Feb 2 at 3:12
What do you mean by "not have digits" and "(word)"? Does not have digits refer only to anything that is purely alphabetic or does it include ones with a name plus a few digits (given that some are purely numeric)? Is (word) the literal string "(word)" or is that a placeholder for something? What delimits the lines (Linux and Windows are different)?
– fixer1234
Feb 2 at 6:33
I'm voting to close this question as off-topic because questions must demonstrate a reasonable amount of research & understanding of the problem being solved. Please edit to either a) clearly describe your problem and the research done so far to solve it or b) include attempted solutions plus why they didn't work. In either case, be sure your expected results are clearly presented.
– Tetsujin
Feb 2 at 8:06
Since you have (somewhat) clarified what you want, I have cleaned up your question a little. But (1) I asked you to shorten the list of examples. OK, you shortened it, from 19 to 13. But you really show only three cases: a string of letters, a string of digits, and a string of letters followed by a string of digits. It’s especially disappointing that you edited the list down to eight examples (including all three cases), and then you totally unnecessarily added five more. (2) This is a trivially easy problem. What research have you done? What have you learned? What have you tried? … (Cont’d)
– Scott
Feb 2 at 19:29
|
show 2 more comments
I have a file with about 10000 lines like the examples shown below.
I need to replace the lines that do not contain any digits
with some word; e.g., input
.
How I can do this please?
Example:
The list I have is like this:
1234561
Winstead
Adesuwa1985
Trinity
Angela41
Anita
Tracey
sdojsodsd
I want results like this, where the lines that do not have any number
are replaced with the word “input
”:
1234561
input
Adesuwa1985
input
Angela41
input
input
input
linux windows command-line notepad++ text-editing
I have a file with about 10000 lines like the examples shown below.
I need to replace the lines that do not contain any digits
with some word; e.g., input
.
How I can do this please?
Example:
The list I have is like this:
1234561
Winstead
Adesuwa1985
Trinity
Angela41
Anita
Tracey
sdojsodsd
I want results like this, where the lines that do not have any number
are replaced with the word “input
”:
1234561
input
Adesuwa1985
input
Angela41
input
input
input
linux windows command-line notepad++ text-editing
linux windows command-line notepad++ text-editing
edited Feb 2 at 19:27
Scott
15.9k113990
15.9k113990
asked Feb 2 at 1:48


banout chispbanout chisp
62
62
closed as unclear what you're asking by Scott, fixer1234, Tetsujin, harrymc, Toto Feb 2 at 10:41
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
closed as unclear what you're asking by Scott, fixer1234, Tetsujin, harrymc, Toto Feb 2 at 10:41
Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.
4
(1) Rather than (just) give 19 examples of what data you have, it would be better if you gave six to eight examples of what you have and what result you want. (2) This sounds like a fairly trivial (easy) problem. What research have you done? What have you learned? What have you tried? … … … … … … … … … … … … Please do not respond in comments; edit your question to make it clearer and more complete.
– Scott
Feb 2 at 2:22
2
you are casting a broad net with your tags. Linux and windows? can you be more specific?
– glenn jackman
Feb 2 at 3:12
What do you mean by "not have digits" and "(word)"? Does not have digits refer only to anything that is purely alphabetic or does it include ones with a name plus a few digits (given that some are purely numeric)? Is (word) the literal string "(word)" or is that a placeholder for something? What delimits the lines (Linux and Windows are different)?
– fixer1234
Feb 2 at 6:33
I'm voting to close this question as off-topic because questions must demonstrate a reasonable amount of research & understanding of the problem being solved. Please edit to either a) clearly describe your problem and the research done so far to solve it or b) include attempted solutions plus why they didn't work. In either case, be sure your expected results are clearly presented.
– Tetsujin
Feb 2 at 8:06
Since you have (somewhat) clarified what you want, I have cleaned up your question a little. But (1) I asked you to shorten the list of examples. OK, you shortened it, from 19 to 13. But you really show only three cases: a string of letters, a string of digits, and a string of letters followed by a string of digits. It’s especially disappointing that you edited the list down to eight examples (including all three cases), and then you totally unnecessarily added five more. (2) This is a trivially easy problem. What research have you done? What have you learned? What have you tried? … (Cont’d)
– Scott
Feb 2 at 19:29
|
show 2 more comments
4
(1) Rather than (just) give 19 examples of what data you have, it would be better if you gave six to eight examples of what you have and what result you want. (2) This sounds like a fairly trivial (easy) problem. What research have you done? What have you learned? What have you tried? … … … … … … … … … … … … Please do not respond in comments; edit your question to make it clearer and more complete.
– Scott
Feb 2 at 2:22
2
you are casting a broad net with your tags. Linux and windows? can you be more specific?
– glenn jackman
Feb 2 at 3:12
What do you mean by "not have digits" and "(word)"? Does not have digits refer only to anything that is purely alphabetic or does it include ones with a name plus a few digits (given that some are purely numeric)? Is (word) the literal string "(word)" or is that a placeholder for something? What delimits the lines (Linux and Windows are different)?
– fixer1234
Feb 2 at 6:33
I'm voting to close this question as off-topic because questions must demonstrate a reasonable amount of research & understanding of the problem being solved. Please edit to either a) clearly describe your problem and the research done so far to solve it or b) include attempted solutions plus why they didn't work. In either case, be sure your expected results are clearly presented.
– Tetsujin
Feb 2 at 8:06
Since you have (somewhat) clarified what you want, I have cleaned up your question a little. But (1) I asked you to shorten the list of examples. OK, you shortened it, from 19 to 13. But you really show only three cases: a string of letters, a string of digits, and a string of letters followed by a string of digits. It’s especially disappointing that you edited the list down to eight examples (including all three cases), and then you totally unnecessarily added five more. (2) This is a trivially easy problem. What research have you done? What have you learned? What have you tried? … (Cont’d)
– Scott
Feb 2 at 19:29
4
4
(1) Rather than (just) give 19 examples of what data you have, it would be better if you gave six to eight examples of what you have and what result you want. (2) This sounds like a fairly trivial (easy) problem. What research have you done? What have you learned? What have you tried? … … … … … … … … … … … … Please do not respond in comments; edit your question to make it clearer and more complete.
– Scott
Feb 2 at 2:22
(1) Rather than (just) give 19 examples of what data you have, it would be better if you gave six to eight examples of what you have and what result you want. (2) This sounds like a fairly trivial (easy) problem. What research have you done? What have you learned? What have you tried? … … … … … … … … … … … … Please do not respond in comments; edit your question to make it clearer and more complete.
– Scott
Feb 2 at 2:22
2
2
you are casting a broad net with your tags. Linux and windows? can you be more specific?
– glenn jackman
Feb 2 at 3:12
you are casting a broad net with your tags. Linux and windows? can you be more specific?
– glenn jackman
Feb 2 at 3:12
What do you mean by "not have digits" and "(word)"? Does not have digits refer only to anything that is purely alphabetic or does it include ones with a name plus a few digits (given that some are purely numeric)? Is (word) the literal string "(word)" or is that a placeholder for something? What delimits the lines (Linux and Windows are different)?
– fixer1234
Feb 2 at 6:33
What do you mean by "not have digits" and "(word)"? Does not have digits refer only to anything that is purely alphabetic or does it include ones with a name plus a few digits (given that some are purely numeric)? Is (word) the literal string "(word)" or is that a placeholder for something? What delimits the lines (Linux and Windows are different)?
– fixer1234
Feb 2 at 6:33
I'm voting to close this question as off-topic because questions must demonstrate a reasonable amount of research & understanding of the problem being solved. Please edit to either a) clearly describe your problem and the research done so far to solve it or b) include attempted solutions plus why they didn't work. In either case, be sure your expected results are clearly presented.
– Tetsujin
Feb 2 at 8:06
I'm voting to close this question as off-topic because questions must demonstrate a reasonable amount of research & understanding of the problem being solved. Please edit to either a) clearly describe your problem and the research done so far to solve it or b) include attempted solutions plus why they didn't work. In either case, be sure your expected results are clearly presented.
– Tetsujin
Feb 2 at 8:06
Since you have (somewhat) clarified what you want, I have cleaned up your question a little. But (1) I asked you to shorten the list of examples. OK, you shortened it, from 19 to 13. But you really show only three cases: a string of letters, a string of digits, and a string of letters followed by a string of digits. It’s especially disappointing that you edited the list down to eight examples (including all three cases), and then you totally unnecessarily added five more. (2) This is a trivially easy problem. What research have you done? What have you learned? What have you tried? … (Cont’d)
– Scott
Feb 2 at 19:29
Since you have (somewhat) clarified what you want, I have cleaned up your question a little. But (1) I asked you to shorten the list of examples. OK, you shortened it, from 19 to 13. But you really show only three cases: a string of letters, a string of digits, and a string of letters followed by a string of digits. It’s especially disappointing that you edited the list down to eight examples (including all three cases), and then you totally unnecessarily added five more. (2) This is a trivially easy problem. What research have you done? What have you learned? What have you tried? … (Cont’d)
– Scott
Feb 2 at 19:29
|
show 2 more comments
0
active
oldest
votes
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Ogk0j25u9N XcU4MX sPinG5m3qAa6sWM TFjkWNGTevO,17Z,O3Jwww6haS,kaGAbeJ S0
4
(1) Rather than (just) give 19 examples of what data you have, it would be better if you gave six to eight examples of what you have and what result you want. (2) This sounds like a fairly trivial (easy) problem. What research have you done? What have you learned? What have you tried? … … … … … … … … … … … … Please do not respond in comments; edit your question to make it clearer and more complete.
– Scott
Feb 2 at 2:22
2
you are casting a broad net with your tags. Linux and windows? can you be more specific?
– glenn jackman
Feb 2 at 3:12
What do you mean by "not have digits" and "(word)"? Does not have digits refer only to anything that is purely alphabetic or does it include ones with a name plus a few digits (given that some are purely numeric)? Is (word) the literal string "(word)" or is that a placeholder for something? What delimits the lines (Linux and Windows are different)?
– fixer1234
Feb 2 at 6:33
I'm voting to close this question as off-topic because questions must demonstrate a reasonable amount of research & understanding of the problem being solved. Please edit to either a) clearly describe your problem and the research done so far to solve it or b) include attempted solutions plus why they didn't work. In either case, be sure your expected results are clearly presented.
– Tetsujin
Feb 2 at 8:06
Since you have (somewhat) clarified what you want, I have cleaned up your question a little. But (1) I asked you to shorten the list of examples. OK, you shortened it, from 19 to 13. But you really show only three cases: a string of letters, a string of digits, and a string of letters followed by a string of digits. It’s especially disappointing that you edited the list down to eight examples (including all three cases), and then you totally unnecessarily added five more. (2) This is a trivially easy problem. What research have you done? What have you learned? What have you tried? … (Cont’d)
– Scott
Feb 2 at 19:29