ok basically i want to cut off numbers in page numbering
the bottom line of code does as it shud
the page number isnt a <a href=''> its just like [4]
each number is seperated by a | hense the "\s\|\s"'s
why doesnt the top one work?
it cuts off only the last number for sum reason
using "U" after the "#" doesnt work
the bottom line of code does as it shud
the page number isnt a <a href=''> its just like [4]
each number is seperated by a | hense the "\s\|\s"'s
why doesnt the top one work?
it cuts off only the last number for sum reason
using "U" after the "#" doesnt work
Code:
// ======================= // Cut off excess numbers // ======================= $text = preg_replace('#\]\s\|\s(.*)\s\|\s(.*)#', '] | [url="file://\1"]\\1[/url] | ...', $text); $text = preg_replace('#(.*)\s\|\s(.*)\s\|\s(.*)\s\|\s\[#', '... [url="file://\2"]\\2[/url] | [url="file://\3"]\\3[/url] | [', $text);
Comment