wildcard - With PHP how do I extract a alpha numeric from a string -


I've been searching for a while, but I did not find my only one.

With PHP I need to remove 2 groups of different numbers within a series of numbers and letters, it always happens between the last and the last duration.

Like: exten-651

Hopefully you can share your thoughts on this.

Thank you in advance.

This is always the last and final Duration is between.

$ string = 'exten-651-652-20140423-154650-1398293210.14.wav'; $ Data = explosion ("-", $ string); Echo str_replace ('.wav', '', array_pop ($ data));

Demo:


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -