Re: Decomposing a URI into its components

Thanks for this tip, Dan.

Andrea


Dan Connolly wrote:
> Andrea Perego wrote:
>> Thanks. Yes, this is what I did. However, I had to specify one rule for
>> each URI component:
>> [...]
>> Can this be obtained in a simpler way?
> 
> Yes; try str:search . The tests and documentation for it
> are not all in place, but it works:
> 
> class BI_search(LightBuiltIn, Function):
>     """a more powerful built-in for scraping using regexps.
>     takes a list of 2 strings; the first is the
>     input data, and the second is a regex with one or more () group.
>     Returns the list of data matched by the () groups.

Received on Thursday, 24 May 2007 13:31:30 UTC