micro
micro copied to clipboard
Cant replace "$" character in file
Description of the problem or steps to reproduce
Have a file (Personally an .html in my case) and try to use replaceall "$" "other string"
Specifications
Version: 2.0.11 Commit hash: 225927b9
Commit hash: OS: Linux mint Terminal: Bash
$
is the special regex symbol. Escape it:
replaceall \$
$
is the special regex symbol. Escape it:replaceall \$
Still running into problems for some reason
example
amount of money = $4000
replaceall $ text and also replaceall "$" text
amount of money = $4000
To replace the only $
replaceall \$
Variants to replace $4000
replaceall \$\S+
replaceall \$\d+
replaceall \$4000
replace $
with text
replaceall \$ 'dollars '
Hey I'm going to try to upgrade to the newest version of micro, but It still doesn't work
still getting problems
still getting problems
I do not know. In my case all works. Are you sure that $
sign is \U0024
?
That worked, thank you so much! needed the ' ' characters
needed the ' ' characters
I do not know what is difference but on Windows it works without ''.
I'm running into a similar issue, but with the replacement value. None of these seem to work, they just end up replacing the search value with an empty string
replace foo $HOME replace foo $HOME replace foo '$HOME' replace foo "$HOME"
@encodis the replace command ends up calling Regexp.Expand (which uses $
for capture groups in the replacement). The proper way to escape the $
is replace foo $$HOME
.
@Andriamanitra Ah! thank you!