Reputation: 150
i want remove characters between ", R.drawable and ); in notepad++
case : ed.getText().insert(ed.getSelectionStart(), getSmiledText(getBaseContext(), "🌞", R.drawable.em_1f31e);
case : ed.getText().insert(ed.getSelectionStart(), getSmiledText(getBaseContext(), "🌠", R.drawable.em_1f320);
case : ed.getText().insert(ed.getSelectionStart(), getSmiledText(getBaseContext(), "🌰", R.drawable.em_1f330);
case : ed.getText().insert(ed.getSelectionStart(), getSmiledText(getBaseContext(), "🌱", R.drawable.em_1f331);
case : ed.getText().insert(ed.getSelectionStart(), getSmiledText(getBaseContext(), "🌲", R.drawable.em_1f332);
and want change case to case number like this :
case 10 : ed.getText().insert(ed.getSelectionStart(), getSmiledText(getBaseContext(), "🌞", R.drawable.em_1f31e);
case 11 : ed.getText().insert(ed.getSelectionStart(), getSmiledText(getBaseContext(), "🌠", R.drawable.em_1f320);
case 12 : ed.getText().insert(ed.getSelectionStart(), getSmiledText(getBaseContext(), "🌰", R.drawable.em_1f330);
case 13 : ed.getText().insert(ed.getSelectionStart(), getSmiledText(getBaseContext(), "🌱", R.drawable.em_1f331);
case 14 : ed.getText().insert(ed.getSelectionStart(), getSmiledText(getBaseContext(), "🌲", R.drawable.em_1f332);
begin from 10 to * . this possible ?
Upvotes: 0
Views: 744
Reputation: 4987
This line in AWK inserts number of row if the row is greater or equal to 10:
awk '{ i++; if(i>=10){ print $1, i, $0} else print }' your_file.txt
You can do it easy in JAVA reading lines with BufferedReader. After you read a line, just split it with ' ' and check if the row is greater than 9, if it is then add a number line after first word
Upvotes: 1
Reputation: 3378
For the first part of your question select Regular Expression in the Find Replace and Find:
(R.drawable).+(\);)
and Replace with:
\1\2
The second part can be done by holding alt and selecting the column then going Edit->Column Editor and playing with Number to Insert.
Upvotes: 0