Tagged Questions
2
votes
3answers
205 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 ...
3
votes
3answers
2k views
How to pass a string parameter on bash function?
I have this code that does work:
get_parameter ()
{
echo "$query" | sed -n 's/^.*name=\([^&]*\).*$/\1/p' | sed "s/%20/ /g"
}
But I want to replace the "name" with the parameter that I pass ...