Formulas and Functions Help
- Welcome
 - Intro to formulas and functions
 - 
        
        
- ACCRINT
 - ACCRINTM
 - BONDDURATION
 - BONDMDURATION
 - COUPDAYBS
 - COUPDAYS
 - COUPDAYSNC
 - COUPNUM
 - CUMIPMT
 - CUMPRINC
 - CURRENCY
 - CURRENCYCODE
 - CURRENCYCONVERT
 - CURRENCYH
 - DB
 - DDB
 - DISC
 - EFFECT
 - FV
 - INTRATE
 - IPMT
 - IRR
 - ISPMT
 - MIRR
 - NOMINAL
 - NPER
 - NPV
 - PMT
 - PPMT
 - PRICE
 - PRICEDISC
 - PRICEMAT
 - PV
 - RATE
 - RECEIVED
 - SLN
 - STOCK
 - STOCKH
 - SYD
 - VDB
 - XIRR
 - XNPV
 - YIELD
 - YIELDDISC
 - YIELDMAT
 
 - 
        
        
- AVEDEV
 - AVERAGE
 - AVERAGEA
 - AVERAGEIF
 - AVERAGEIFS
 - BETADIST
 - BETAINV
 - BINOMDIST
 - CHIDIST
 - CHIINV
 - CHITEST
 - CONFIDENCE
 - CORREL
 - COUNT
 - COUNTA
 - COUNTBLANK
 - COUNTIF
 - COUNTIFS
 - COVAR
 - CRITBINOM
 - DEVSQ
 - EXPONDIST
 - FDIST
 - FINV
 - FORECAST
 - FREQUENCY
 - GAMMADIST
 - GAMMAINV
 - GAMMALN
 - GEOMEAN
 - HARMEAN
 - INTERCEPT
 - LARGE
 - LINEST
 - LOGINV
 - LOGNORMDIST
 - MAX
 - MAXA
 - MAXIFS
 - MEDIAN
 - MIN
 - MINA
 - MINIFS
 - MODE
 - NEGBINOMDIST
 - NORMDIST
 - NORMINV
 - NORMSDIST
 - NORMSINV
 - PERCENTILE
 - PERCENTRANK
 - PERMUT
 - POISSON
 - PROB
 - QUARTILE
 - RANK
 - SLOPE
 - SMALL
 - STANDARDIZE
 - STDEV
 - STDEVA
 - STDEVP
 - STDEVPA
 - TDIST
 - TINV
 - TTEST
 - VAR
 - VARA
 - VARP
 - VARPA
 - WEIBULL
 - ZTEST
 
 

REGEX.EXTRACT
The REGEX.EXTRACT function returns the matches or capture groups in a match of a given regular expression in a source string.
REGEX.EXTRACT(source-string, regular-expression-string, match-occurrence, capture-group-occurrence)
source-string: A string value to be matched against.
regular-expression-string: A string value representing a regular expression, used to match against source-string.
match-occurrence: An optional integer indicating which match should be returned in case there are multiple matches. Negative integers are accepted and allow accessing the matches backwards, so -1 is the last match, and so on. If 0 is given, an array of all matches will be returned. If omitted, the first match is returned.
capture-group-occurrence: An optional integer indicating which capture group within a match should be returned in case there are capture groups in the regular expression. Negative values are not accepted. If 0 is returned, an array of all capture groups will be returned. If omitted, the entire match is returned.
Notes
The regular-expression-string has to conform to the ICU standard.
Examples  | 
|---|
Let A1 be "marina@example.com john@example.ca mike@example.de". =REGEX.EXTRACT(A1, "([A-Z0-9a-z._%+-]+)@([A-Za-z0-9.-]+\.[A-Za-z]{2,4})") returns "marina@example.com". =REGEX.EXTRACT(A1, "([A-Z0-9a-z._%+-]+)@([A-Za-z0-9.-]+\.[A-Za-z]{2,4})", 2) returns "john@example.ca". =REGEX.EXTRACT(A1, "([A-Z0-9a-z._%+-]+)@([A-Za-z0-9.-]+\.[A-Za-z]{2,4})", -1) returns "mike@example.de". =REGEX.EXTRACT(A1, "([A-Z0-9a-z._%+-]+)@([A-Za-z0-9.-]+\.[A-Za-z]{2,4})", 1, 1) returns "marina". =REGEX.EXTRACT(A1, "([A-Z0-9a-z._%+-]+)@([A-Za-z0-9.-]+\.[A-Za-z]{2,4})", 2, 2) returns "example.ca".  |