Extracting text from a string
Claudio Grondi
claudio.grondi at freenet.de
Thu Sep 7 14:37:59 EDT 2006
Tempo wrote:
> Hello. I am having a little trouble extracting text from a string. The
> string that I am dealing with is pasted below, and I want to extract
> the prices that are contained in the string below. Thanks in advanced
> for any and all help. Thank you.
>
>
>
> <span class="sale">
> $14.99
> </span>, <span class="sale">
> $27.99
> </span>, <span class="sale">
> $66.99
> </span>, <span class="sale">
> $129.99
> </span>, <span class="sale">
> $254.99
> </span>
>
What have you tried?
Taking a look into regular expressions in the Python tutorial (4.2 re --
Regular expression operations) should give you all you need.
Claudio Grondi
More information about the Python-list
mailing list