0

I have a heft php file that has a ton of variables like this:

floatval($string)

$string is always a different string but I want to remove all these floats. What is an easy way to remove floatval($anything)?

I use Sublime if it matters.

Riccardo Marotti
  • 20,218
  • 7
  • 70
  • 53

2 Answers2

1

Use search and replace (ctrl + H). Also, select the 'Regular Expression' option. Then search for floatval\(\$[a-zA-Z]*\) and replace with nothing.

Sublime

Ayush
  • 41,754
  • 51
  • 164
  • 239
0

You want to use a regular expression to search for that pattern and do the replacement, as explained in the answer of this question. The matching expression would be something like:

floatval\(\$([a-zA-Z_][a-zA-Z0-9_]+)\)

and the replacement one:

 \$\1
Community
  • 1
  • 1
didierc
  • 14,572
  • 3
  • 32
  • 52