Forum Discussion

Robert_47833's avatar
Robert_47833
Icon for Altostratus rankAltostratus
Sep 14, 2011

match_regex

$uri match_regex "^/(sell)"

 

Hi,can someone know the meaning of "()" here? what is the function of ()

 

 

also match_regex "^/(sell|cjj|bpm|)",what does the "|" mean here

 

  • The "()" are used for logical grouping.

     

     

    The "|" is for Alterations.

     

     

    There is a nice Regular Expressions Cheat Sheet here:

     

    http://opencompany.org/download/regex-cheatsheet.pdf

     

     

    You can get a nice one for .NET here:

     

    http://regexlib.com/CheatSheet.aspx