regex for numbers
Regex regex = new Regex(@"^d$");
regex for numbers
Regex regex = new Regex(@"^d$");
tpl regex any numbers
{$your_string|regex_replace:"/[0-9]/":"text you want to replace with"}
PAY ATTENTION
Ex: the string is: 'test.com/foo123-test/' and you use:
{$your_string|regex_replace:"/[0-9]/":"bar"}
The result will be 'test.com/foobarbarbar-test/'
beacuse it match three times the regex rule
If you want to replace the full '123' part you can add another char to makes the match unique, like:
{$your_string|regex_replace:"/[0-9]+-/":"bar"}
this is needed to ADD char-^^-this is the added char
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us