Skip to main content
4 de 4
tags editadas
Maniero
  • 484,4mil
  • 94
  • 1,3mil
  • 2,2mil

Detectar Quebra de Linha

Tenho a seguinte função:

  if (str.match(/\d\d\d\d\d\.\d\d\d\d\d/)) {
    var codigo_velho = str.match(/\d\d\d\d\d\.\d\d\d\d\d\/);
    result = "1"; }

Como alterar esta função para que ela detecte quebra de linha no match? Por exemplo, tentei com \n mas não deu certo:

 if (str.match(/\d\d\d\d\d\.
                         \d\d\d\d\d/)) {
    var codigo_velho = str.match(/\d\d\d\d\d\.
                                       \d\d\d\d\d\/);
    result = "1"; }
user7605
  • 1,6mil
  • 6
  • 25
  • 49