Tagged Questions
2
votes
3answers
195 views
How to reverse-match a string in the Vim programming language?
I want to find the last index of any character in the [abc] set in the abcabc string but the search should start from the end of the string:
" Returns the 0th index but I want the 5th.
let ...
2
votes
2answers
245 views
remove only specific text occurrences from string using sed
I have a text file that contains many rows of this sort of thing:
/*[17:51:27][1 ms]*/ UPDATE `country` SET `region_id` = '4' WHERE `country_id` = '36';
Is there a way that I can use sed to remove ...
2
votes
2answers
383 views
How to remove error messages when searching recursively for a string?
I use
find -type f -print0 | xargs -0 -n 10 grep -i searchstring
to search recursively for a string. But it also gives me error messages like "permission denied". How can I avoid such error messages ...