- profile: https://br.linkedin.com/in/paulo-alberto-nogueira-figueiro-b04136117/en
- @albertklik
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//framework de validação de dados de formulario para aplicativos rápidos | |
//recebe uma string de dados de um documento | |
//define uma regra com expressões regulares com base em opções definidas pelo usuario | |
//verifica a primeira ocorrência | |
//verifica numero de ocorrências do documento |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
reg_list = [ | |
(r'for[ ]+([_A-Z-a-z][_A-Z-a-z0-9]*)[ ]+:=[ ]+(.*)[ ]+downto[ ]+(\d)[ ]+do[ ]*', r'for (\1 in \2 downto \3)'), | |
(r'for[ ]+([_A-Z-a-z][_A-Z-a-z0-9]*)[ ]+:=[ ]+(\d)[ ]+to[ ]+(.*)[ ]+do[ ]*', r'for (\1 in \2..\3)'), | |
(r'if[ ]+(.*)[ ]+then', r'if (\1)'), | |
(r'\bvar\b', r''), | |
(r'\bbegin\b', r'{'), | |
(r'\bend\b', r'}'), | |
(r' = ', r' == '), | |
(r'inc\((.*)\)', r'\1++'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#nullable enable | |
using System.Net; | |
using System.Net.Http.Headers; | |
using System.Net.Http.Json; | |
using System.Text; | |
using System.Text.Json; | |
using Microsoft.Extensions.Logging; | |
namespace App.Http; |