as on img:

i've tried a hundreds of patterns, and still nothing
for #1 not working:
Code: Select all
'/\..+$/'
'/\..+?$/'
'/\..+?(?!\.)$/'
\
yes, this is followed char, I only dont know if
logic is not inversed by $Code: Select all
$replace = '/\.[\w\W]+$/';
$with = '';
preg_replace($replace,$with,$str);others:
Code: Select all
'/\.[\w\W^\.]+$/'
'/\.[\w\W^\.]+?$/'
'/\.[\w\W[^\.]]+?$/'
'/\.[\w[\W[^\.]]]+?$/'
'/\.[\w\W&&[^\.]]]+?$/' //&& working in java, but rather not in php
'/\.(?:\w|\W)+$/' //or even without []
'/\.(?:\w?|\W?)+$/' Code: Select all
'/\.[(\w)\W^\.]+?$/'
'/\.(?:\(w?)|\W?)+$/'
$replacer = '\.$1';
greetings
michael
