Obtain data from a regular expression

0

I have a problem trying to find out what my username and password are.

I have a challenge to ask and they ask me to find my username and password based on a clue given by the following regular expression:

[1-3]{0,4}

Which gives me an intendity number that I think serves as a clue as well to be able to determine the answer:

2035645013

I searched but could not find anything that could help me.

How could I do this?

    
asked by A arancibia 08.06.2018 в 15:20
source

2 answers

0

The expression:

[1-3]{0,4}

It means: a succession of between no and 4 numbers, all of them between 1 and 3.

This means that the following values comply:

  # nada
1
123
111
1111

etc.

Now, given:

2035645013

We must go exploring what combinations have it:

2035645013
^       ^^

Looking at it well, we note that there are only two possible sequences:

2     # números entre 1 y 3, 1 vez
13    # números entre 1 y 3, 2 veces

Therefore the solution is that it is either 2 or 13 . Maybe the username is 2 and password 13?

    
answered by 08.06.2018 / 15:25
source
1

Well, when you apply that regular expression to the number they gave you, you get:

  

2313

and the remaining numbers are:

  

056450

    
answered by 08.06.2018 в 15:25