digitalmars.D.learn - Is it possible to make replaces of multiple regexes at once?
- Maaaks (11/11) Apr 23 2014 Hi.
Hi. I'm looking for a function that can perform multiple replaces at once. For example, there's such function in PHP, here's example from its site: <?php $patterns = array ('/(19|20)(\d{2})-(\d{1,2})-(\d{1,2})/', '/^\s*{(\w+)}\s*=/'); $replace = array ('\3/\4/\1\2', '$\1 ='); echo preg_replace($patterns, $replace, '{startDate} = 1999-5-27'); ?> Does D have similar function?
Apr 23 2014