How does beatuifulsoup use regular extraction strings?

the following html string. 3001 is variable. This visit is 3001, and the next visit may be 3002. You need to extract the number in this double quotation mark (that is, 3001 at this time).
must also match the preceding , because there are many div, that only the div with this comment is valid.

<!-- pc jieou new --><div id="3001"

ask for advice, how to write this rule with beatuifulsoup


'<!-- pc jieou new --><div id="(\d+?)"'
Menu