Using the code below, I can turn Number123(45)into Number.
Number123(45)
Number
$string = 'Number123(45)'; $string2 = preg_replace('/[0-9]+/', '', $string); echo $string2;
How would I just delete the numbers in parentheses (brackets) so that the output is Number123()?
Number123()
Include parentheses in the template, for example:
$string = 'Number123(45)'; $string2 = preg_replace('/\([0-9]+\)/', '()', $string); echo $string2;
Conclusion:
Number123 ()
Source: https://habr.com/ru/post/1651327/More articles:Rendered Shadow Rendering (OpenGL) - renderingWhere can I get Perl 4? - perlAndroid Drive API OAuth BAD_AUTHENTICATION - javaSet.prototype.has () with predicate - javascriptBlank screen when navigating Angular routes in Electron app - angularjsHow to export a database from DataGrip to a single SQL file? - datagripResponse.Flush в классическом ASP, вызывающем порты TIME_WAIT - asp-classicConnecting ASP SQL Server - sqlPassing variables in classic ASP - variablesDatabase to array - sqlAll Articles