PHP regulars

how to make numbers without leading 0’s? the text may contain <080> how to get $1=80instead of $1=080? if there is such a way)

Answer 1

try to rewrite it somewhere like this

/\<0*(\d+)\>/','<img src="$1.jpg" />

And enable greedy mode if it’s not enabled. The 0* construct will just capture the leading zeros.