smarty regex replace - remove unnecessary chars
I have to change string like "100,23 zł" and "29,23 $" to: "100,23" "29,23" So i want to remove all characters instead of numbers and ','
You can use a negated class containing only digits and comma: [^0-9,]+ See demo on regex101.
I don't know how to do it with your language but it would be simple enough, just match anything that isn't a number or a comma and replace it with an empty string. So match any non-digit character or a comma with: (\D|,)* or this [^0-9,]* Replace with empty string: "" or '' depending on your language string delimiters .
you can replace this /\s\D+/ with empty string and this will do. This is applicable when you do not have any other content in the file. If you do have other contents too then try this /\d+\s\D+/
Regex find and replace over multi lines in Shell
Grepping a 20g file in bash
What Perl matching regexp nuances can cause headaches?
What is the invalid URI error from SpamAssassin actually matching?
Validate postal cade using Regex on each character
VBA regex - match an expression that doesn't begin with a particular word
How to pass variable to regular expression in PERL
Batch rename screen shots on Mac OS X
US Phone regex that works in IE
Regex with lookaround for Lazarus
codeigniter regular expression for uri slug in routes
regex to match strings not preceded by a bang
What would the regex to match the hostname of this string?
How do I do a regex search and replace in sublime text 2?
Why are these regular expressions different?
r regex mileage