# Parse uri content for filename, save as variable

**URL:** <https://forum.ansible.com/t/parse-uri-content-for-filename-save-as-variable/33077>\
**Category:** AWX Project\
**Created:** [June 2, 2020, 10:32pm UTC](https://forum.ansible.com/t/parse-uri-content-for-filename-save-as-variable/33077 "2020-06-02T22:32:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bill\_Biker](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/bill_biker/32/8087_2.png) [@Bill\_Biker](https://forum.ansible.com/u/Bill_Biker)\
**Post date:** [June 2, 2020, 10:32pm UTC](https://forum.ansible.com/t/parse-uri-content-for-filename-save-as-variable/33077/1 "2020-06-02T22:32:42Z")

</div>

Hello All,

I have a command using uri that gives me data from a url

“msg”: “An item: \<td valign="top"\>\<img src="/icons/unknown.gif" alt=""\>\<a href="errata-20200601.iso"\>errata-20200601.iso \<td align="right"\>2020-06-01 17:18 \<td align="right"\> 21G&nbsp;”

I need to get the substring errata-20200601.iso from this ouput from the ansible register variable.  
There is more than one line with the errata-.iso - I only have two

I have seen where “search” or “match” or “regex” might be used to parse the string and get the value  
but have not quite got that - and yes I need then to get the DATE info and compare and use the newer of the  
two dates.

any suggestions on this?

Thanks,

ewholz
