1
I’m doing a search to return the article numbers, used:
preg_match_all('/\d+/', $novalinhas, $matches);
$artigo = (int)implode('',$matches[0]);
It is working, however, in some articles it picks more numbers besides the article, but it does not capture all the numbers in the string.
For example in this article below his id is artigo2040827.
Art. 2.040. The legal mortgage of the property of the guardian or curator, registered in accordance with Article IV. 827 of the previous Civil Code, Law no 3.071, of January 1, 1916, may be canceled, obeying the provisions of the sole paragraph of the art. 1.745 of this Code.
I tried to use
[0-9]+. [0-9]+ // Before art. 100, only Article0, and after 999, only Article1
Note: The articles have variations of:
Art. 1 to Art. 2,023.
1 by 2000 or 1 by 2023?
– Adir Kuhn
There are several laws, so the number of articles varies. The largest I’ve seen so far is up to 2046 articles.
– Alê Moraes