'C12345678'.match("^C\d{8}$")
and
'C12345678'.match("^C\[0-9]{8}$")
Why does this statement has different values?
By : Nguyen Tran
'C12345678'.match("^C\d{8}$")
and
'C12345678'.match("^C\[0-9]{8}$")
Why does this statement has different values?
Because in the first case you need to escape the backslash:
console.log('C12345678'.match("^C\\d{8}$"));
As pointed out by Wiktor in the comment below, it's best to use the Regex literal syntax:
console.log('C12345678'.match(/^C\d{8}$/));
in the final html output ui-select and ui-select-match will be generated as classes. so use the below code to get the desire output.
.ui-select {
width: 100px;
}
.ui-select-match {
width: 100px;
}
Here is the Plunker code.
Isn't
Content.list(max: 2, sort: "dateCreated", order: "desc")
a possibility?