I have about 500 lines stored in a text file.
Each line look like Filename_662344.xlsx , 324.
I would like to count numbers at the end of each line (324 in this case).
My idea is to delete part of lines using preg_replace() function.
I tried preg_replace("/[^0-9]/", '', $line); , but the result was 662344324
How should the pattern look like if I want to delete the filename (including numbers);
Thanks!
$parts = explode(',', $line)and then use$part[1]... no need to fiddle with regex here?