Re: [Tutor] How to get user input as regex

2005-04-02 Thread Dick Moores
Pierre Barbier de Reuille wrote at 07:22 4/2/2005: You should do something much simpler ^_^ : import re s = raw_input("regex : ") digs = re.compile(s) [...] Aha! Thanks! Dick ___ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinf

Re: [Tutor] How to get user input as regex

2005-04-02 Thread Pierre Barbier de Reuille
You should do something much simpler ^_^ : import re s = raw_input("regex : ") digs = re.compile(s) [...] That should work :) pierre Dick Moores a écrit : I'm just beginning to learn regex, and am wondering how to get user input that can be used as a regex. Of course my attempt below doesn't work

[Tutor] How to get user input as regex

2005-04-02 Thread Dick Moores
I'm just beginning to learn regex, and am wondering how to get user input that can be used as a regex. Of course my attempt below doesn't work, but how should I modify it? I'm practicing with phone.txt, which is 513 lines, each line having a name and phone number, and some other details like an