REGEX - How to extract information patterns from a piece of text

I think that this one can help a lot of people.

I personally use the Regex with Urlload to find the issuer and type of a debit card using the bin(I have to admit that @scott helped me with the first version of this snippet)

It is just a sample BIN so not worries about personal information.

{formtext: name=Bin; default=419002}

{urlload: https://iin-bin.com/bin/{=Bin}.html; done=res -> ["issuer"= extractregex(res, "</i> Payment System</th></i> (\w*)</td></tr>"), "bank" = extractregex(res, "</i> Bank Issuer</th>(.)</b></td>"), "type" = extractregex(res, "</i> Card Type</th>(\w)</td></tr>")]}

Issuer: {=issuer}
Bank: {=bank}
Type: {=type}

It works on Text Blaze, I promise :pray:

1 Like