$thisHash('price') = $1 if $pageContent =~ s/prices: \.+?\<\/table\>//s $thisHash('cas') = $1 if $pageContent =~ s/CAS: \\d+-\d{2}-\d+\<\/b\>//s #### $pageContent =~ /(CAS: \\d+-\d{2}-\d+\<\/b\>|).*?(prices: \.+?\<\/table\>|)/s