I am trying to remove '$' signs from a string, but I am guessing it is some special char? I am extremely new to lua (just started coding in it today). From my understanding this should work and does for other chars string.gsub(line,'$','')
.
Regex – remove ‘$’ characters from a string
lualua-patternsregexstring
Related Topic
- Java – How to read / convert an InputStream into a String in Java
- C# – Case insensitive ‘Contains(string)’
- Python – Convert bytes to a string
- Javascript – How to make the first letter of a string uppercase in JavaScript
- Javascript – How to replace all occurrences of a string in JavaScript
- Javascript – Generate random string/characters in JavaScript
- Javascript – How to check whether a string contains a substring in JavaScript
- Python – Does Python have a string ‘contains’ substring method
Best Answer
yup, that's a special character for pattern matching. you need to escape it with the
%
symbol.