regular expressions an text string

R

ragia

hi
i have to match text string char by char to a regular expressions tht
just allow digits 0-9 if other thing a ppear it shall be replaced with
space.how can i do that any help?
so far i have the string and can read it using a for loop...but how to
match each char with the regular expressions and save the result into
other string or replace it with space in that other string to have new
one..
I a new in python ,thatnks in advance
 
P

Peter Otten

ragia said:
i have to match text string char by char to a regular expressions tht
just allow digits 0-9 if other thing a ppear it shall be replaced with
space.how can i do that any help?
' 123 45 6 '

Peter
 
S

s0suk3

hi
i have to match text string char by char to a regular expressions tht
just allow digits 0-9 if other thing a ppear it shall be replaced with
space.how can i do that any help?
so far i have the string and can read it using a for loop...but how to
match each char with the regular expressions and save the result into
other string or replace it with space in that other string to have new
one..
I a new in python ,thatnks in advance
' 123 456'

~~Sosuke~~
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top