Test, validate and match regular expressions
This regular expression matches a hexadecimal string representing a DER or BER encoded ECDSA signature, typically used in Bitcoin transactions. It strictly checks for the '30' sequence header, followed by two integers (the R and S components), which each begin with an '02' tag and optional zero padding. Finally, it optionally captures a trailing one-byte sighash flag (like '01' for SIGHASH_ALL) and operates case-insensitively.