peroz1

u/peroz1


r/learnprogramming•

This is my regex so far:
((\d\d.\d\d.\d\d.\s){1}(\d\d:\d\d){1}(something needs to go here here)(+\d\d\d\s\d\d\s\d\d\d\s\d\d\d):)

It's not finished, it should match these lines as 2 seperate groups:

12.11.17. 22:21 - ‪+111 11 111 111‬: Ali kako ce me prozvat kad ce one kontrolni radit 12.11.17. 22:23 - ‪+222 22 222 222‬: A ljudi

Right now it matches date part and phone number part but if I wirite ( - ) inbetween to match the dash inbetween it breaks, also how would I match a messege part and then match a date as a next group assuming some messeges could contain numbers

111

r/learnpython•

I am asking can I print something like this:

>Do action one
 Do action two

Than i press downarrow:

 Do action one
>Do action two

Then I press enter and it chooses action two and does somehing.

How would I do something like this in Python, is there some module to do this. Sorry if you don't understand what I am saying English isn't my first language

26