isBic function

bool isBic(
  1. String str
)

Returns true if str is a valid BIC/SWIFT code (ISO 9362).

Accepts the 8-character institution form and the 11-character branch form.

Implementation

bool isBic(String str) =>
    bicReg.hasMatch(str.replaceAll(RegExp(r'\s+'), '').toUpperCase());