var formatter = new Windows.Globalization.DateTimeFormatting.DateTimeFormatter("shortdate", ["zh-CN"]);
var time = new Date();
var stringTime = formatter.format(time);
var searchString = "2012[/]";
var reg = new RegExp(searchString);
var result = stringTime.match(reg);
The result is null. I can match "2012" and I can match "[/]" also, but I can't match "2012[/]".
If I use "var stringTime ='2012/7/19'" instead of "var stringTime = formatter.format(time);", it runs
well.
Is there something wrong with DateTimeFormatter.format() ?