Tagged Questions
2
votes
3answers
196 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
4answers
2k views
How can I find all files in a folder that contain a match of a regular expression in the file name?
I'd like to find all of the files in my home folder on Linux (Ubuntu, in this case) that contain a match a particular regular expression. Is there a simple Unix command that I can use in order to do ...
2
votes
1answer
225 views
Emacs: query-replace, regular expression, reuse of search result
How do I combine something like query-replace with a regular expression search-and-replace that in part reuses the search result?
In my case, how to transform
The programmers are "sort of" ...
2
votes
3answers
562 views
How to cut the output to only gather the filename and get-parameter?
I have multiple files with multiple links that are formatted like this:
<a href="http://example.com/fnord.layername.html?parameter=FOO-_-BAR-_-FNORD" class="poit">
<img ... />
...
4
votes
2answers
955 views
How to search and replace multiple needles by one word via one expression?
Assume you have a text file:
foo fnord bar
bizz foo poit
And now I would want to replace both "foo" and "bar" into "narf".
I know I could use:
sed -e 's/foo/narf/g' -e 's/bar/narf/g' fileName
...
