Q&A > regular expressions > How do I change .. to the real filename? - Answer contributed by Shakya
1 while ($string =~ s!(/(?:[^/.]+/)*)((?:[^/.]+/)+\.\./?)(.*)$!$1$3!g)
Yes, I watch meteor showers
No, I do not watch meteor showers
My meteors prefer to bathe
Results (161 votes). Check out past polls.