El metodo match de regEx no acepta booleanos

En el ejercicio, tengo que validar una cadena con 3 criterios, pero no me permite añadir una variable booleana al método. En el ejemplo que acompañáis, la variabla es booleana y no da error. Me ayudáis por favor?

HI @Helena_Mateos_Bravo

Can you share your XAML file

Output Should been in Boolean type Check the varibale


1 Like

Cuál es el archivo XAML :sweat_smile:? Es

it looks like

  • there is variable esValida of datatype Boolean
  • the output of Matches is assigned to esValida

Depending on what you want to achieve you can correct:

If a Boolean is needed triggering that the pattern was matched or not: → use isMatch

If we do later need the extraced value from the match, then correct the datatype to IEnumerable (Of Match) or better recreate the variable with STRG + K in activity property Result

For working more on API Level have a look here:
[CheatSheet] - System.Text.RegularExpressions | RegEx - News / Tutorials - UiPath Community Forum

1 Like

muchas gracias!Solucionado! :muscle:

elimina la variable, luego dale ctrl + k y creas una nueva, el crea automaticamente el tipo de variable que debes usar

@Helena_Mateos_Bravo There are two activities

Matches: Using this you can get all the values that match to a regular expression

Is Match Which returns boolean value when it find the match

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.