\w+\....">

What does (? I) mean and? @ In this regex

In the following regular expression, the values ​​"(? I)" and "? @" Mean?

(?i)<.*?@(?P<domain>\w+\.\w+)(?=>)

I know that "?" means zero or one, and I sets case sensitivity.

This regular expression captures domains from the email address in the mailto field, but does not include the @ sign. It was generated by the erex team from SPLUNK 6.0.2

+4
source share
2 answers

here: https://regex101.com/r/hE9gB4/1

(?i)<.*?@(?P<domain>\w+\.\w+)(?=>)

its actually getting your domain name from an email id:

(?i) makes it case insensitive and

?@- it is nothing but @that literally matches the symbol @.

? ?@ .*?, , < @

? .*, < . ( )

+6

? UNGREEDY LAZYNESS:

. *?

: " , @". . * .

: http://www.regular-expressions.info/repeat.html

+2

Source: https://habr.com/ru/post/1535732/


All Articles