símbolo de padrões na expressão regular [closed]

1

Eu sou novo no regex,

Alguém pode me explicar os padrões:

(<form[^\a]*</form>|<FORM[^\a]*</FORM>)
(method="[a-zA-Z]*|METHOD="[a-zA-Z]*)
    
por Vendetta 20.11.2015 / 15:13

2 respostas

0

Do link (insira o padrão no campo Match pattern e verifique se você marcou Explain . e clique em < kbd> Submit ):

----------------------------------------------------------------------
  (                        group and capture to :
----------------------------------------------------------------------
    <form                    '<form'
----------------------------------------------------------------------
    [^\a]*                   any character except: '\a' (alarm) (0 or
                             more times (matching the most amount
                             possible))
----------------------------------------------------------------------
    </form>                  '</form>'
----------------------------------------------------------------------
   |                        OR
----------------------------------------------------------------------
    <FORM                    '<FORM'
----------------------------------------------------------------------
    [^\a]*                   any character except: '\a' (alarm) (0 or
                             more times (matching the most amount
                             possible))
----------------------------------------------------------------------
    </FORM>                  '</FORM>'
----------------------------------------------------------------------
  )                        end of 
----------------------------------------------------------------------
                           '\r\n'
----------------------------------------------------------------------
  (                        group and capture to :
----------------------------------------------------------------------
    method="                 'method="'
----------------------------------------------------------------------
    [a-zA-Z]*                any character of: 'a' to 'z', 'A' to 'Z'
                             (0 or more times (matching the most
                             amount possible))
----------------------------------------------------------------------
   |                        OR
----------------------------------------------------------------------
    METHOD="                 'METHOD="'
----------------------------------------------------------------------
    [a-zA-Z]*                any character of: 'a' to 'z', 'A' to 'Z'
                             (0 or more times (matching the most
                             amount possible))
----------------------------------------------------------------------
  )                        end of 
----------------------------------------------------------------------
                           '\r\n'
----------------------------------------------------------------------
)                        end of grouping
----------------------------------------------------------------------
    
por Byte Commander 20.11.2015 / 15:24
1

Dois ótimos recursos para o RegExp: Debugexx e expressões regulares < sub> 101

(<form[^\a]*</form>|<FORM[^\a]*</FORM>)

Debuggex

expressões regulares 101

(method="[a-zA-Z]*|METHOD="[a-zA-Z]*)

Debuggex

expressões regulares 101

    
por A.B. 20.11.2015 / 17:45