1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] Use dynamic (variable) string as regex pattern in dart

Discussão em 'Mobile' iniciado por Stack, Setembro 28, 2024 às 10:42.

  1. Stack

    Stack Membro Participativo

    i am trying to pass variable in regex language DART

    `betweenLenth(val, field, [min = 4, max = 20]) {
    final RegExp nameExp = new RegExp(r'^\w{" + min + "," + max + "}$');
    if (!nameExp.hasMatch(val))
    return field + " must be between $min - $max characters ";
    }`


    thanks

    Continue reading...

Compartilhe esta Página