IBAN: Difference between revisions

Content added Content deleted
(Added Wren)
Line 4,139: Line 4,139:
map(v => (v.take(2), if (v.isEmpty) 0 else v.slice(2, 4).toInt))
map(v => (v.take(2), if (v.isEmpty) 0 else v.slice(2, 4).toInt))


lazy val pattern = "([A-Z]{2})([0-9]{2})([A-Z0-9]{4})([A-Z0-9]{0,2})([0-9]{7})(([A-Z0-9]?){0,16})".r
lazy val pattern = "([A-Z]{2})([0-9]{2})([A-Z0-9]{0,30})".r


def apply(s: String) = new Iban(s.replaceAll( """\s""", ""))
def apply(s: String) = new Iban(s.replaceAll( """\s""", ""))