The `isUnicode` property in Dart's `RegExp` class determines whether the regular expression is in Unicode mode.
The syntax of RegExp.isUnicode property is:
bool isUnicode
This isUnicode property of RegExp whether this regular expression is in Unicode mode.
RegExp.isUnicode returns value of type bool
.
In this example,
void main() {
RegExp pattern = RegExp('hello', unicode: true);
print(pattern.isUnicode);
}
true
In this example,
void main() {
RegExp pattern = RegExp('hello', unicode: false);
print(pattern.isUnicode);
}
false
In this Dart tutorial, we learned about isUnicode property of RegExp: the syntax and few working examples with output and detailed explanation for each example.