How to write python regex to find guid in html?
Question: How to find guid in following HTML section?

HTML sample:

    
    
    <td>xxxxxxx</td>
    <td style="display: none">e3aa8247-354b-e311-b6eb-005056b42341</td>
    <td>yyyyyy</td>
    <td style="display: none">e3aa8247-354b-e311-b6eb-005056b42342</td>
    <td>zzzz</td>
    


Answer: Use an HTML Parser, like that "beautiful" and transparent
[`BeautifulSoup`](https://beautiful-soup-4.readthedocs.org/en/latest/)
package.

The idea is to locate `td` elements with `xxxxxxx`, `yyyyyy` texts and get the
following `td` sibling's text value (assuming `xxxxxxx` and `yyyyyy` are
labels you know beforehand):

    
    
    from bs4 import BeautifulSoup
    
    data = """
    <tr>
        <td>xxxxxxx</td>
        <td style="display: none">e3aa8247-354b-e311-b6eb-005056b42341</td>
        <td>yyyyyy</td>
        <td style="display: none">e3aa8247-354b-e311-b6eb-005056b42342</td>
        <td>zzzz</td>
    </tr>
    """
    
    soup = BeautifulSoup(data)
    
    print soup.find("td", text="xxxxxxx").find_next_sibling('td').text
    

Prints:

    
    
    e3aa8247-354b-e311-b6eb-005056b42341
    

