@@ -128,6 +128,10 @@ field("optional_field").ifAbsent(field('default_field'))
128128| [pow (exponent )](./firestore_lite_pipelines .expression .md #expressionpow ) | | <b ><i >(Public Preview )</i ></b > Creates an expression that returns the value of this expression raised to the power of a constant value . |
129129| [regexContains (pattern )](./firestore_lite_pipelines .expression .md #expressionregexcontains ) | | <b ><i >(Public Preview )</i ></b > Creates an expression that checks if a string contains a specified regular expression as a substring . |
130130| [regexContains (pattern )](./firestore_lite_pipelines .expression .md #expressionregexcontains ) | | <b ><i >(Public Preview )</i ></b > Creates an expression that checks if a string contains a specified regular expression as a substring . |
131+ | [regexFind (pattern )](./firestore_lite_pipelines .expression .md #expressionregexfind ) | | <b ><i >(Public Preview )</i ></b > Creates an expression that returns the first substring of a string expression that matches a specified regular expression .<!-- -->This expression uses the [RE2 ](https :// github.com/google/re2/wiki/Syntax) regular expression syntax. |
132+ | [regexFind (pattern )](./firestore_lite_pipelines .expression .md #expressionregexfind ) | | <b ><i >(Public Preview )</i ></b > Creates an expression that returns the first substring of a string expression that matches a specified regular expression .<!-- -->This expression uses the [RE2 ](https :// github.com/google/re2/wiki/Syntax) regular expression syntax. |
133+ | [regexFindAll (pattern )](./firestore_lite_pipelines .expression .md #expressionregexfindall ) | | <b ><i >(Public Preview )</i ></b > Creates an expression that evaluates to a list of all substrings in this string expression that match a specified regular expression .<!-- -->This expression uses the [RE2 ](https :// github.com/google/re2/wiki/Syntax) regular expression syntax. |
134+ | [regexFindAll (pattern )](./firestore_lite_pipelines .expression .md #expressionregexfindall ) | | <b ><i >(Public Preview )</i ></b > Creates an expression that evaluates to a list of all substrings in this string expression that match a specified regular expression .<!-- -->This expression uses the [RE2 ](https :// github.com/google/re2/wiki/Syntax) regular expression syntax. |
131135| [regexMatch (pattern )](./firestore_lite_pipelines .expression .md #expressionregexmatch ) | | <b ><i >(Public Preview )</i ></b > Creates an expression that checks if a string matches a specified regular expression . |
132136| [regexMatch (pattern )](./firestore_lite_pipelines .expression .md #expressionregexmatch ) | | <b ><i >(Public Preview )</i ></b > Creates an expression that checks if a string matches a specified regular expression . |
133137| [reverse ()](./firestore_lite_pipelines .expression .md #expressionreverse ) | | <b ><i >(Public Preview )</i ></b > Creates an expression that reverses this string expression . |
@@ -2868,6 +2872,150 @@ field("description").regexContains(field("regex"));
28682872
28692873```
28702874
2875+ ## Expression.regexFind()
2876+
2877+ > This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
2878+ >
2879+
2880+ Creates an expression that returns the first substring of a string expression that matches a specified regular expression.
2881+
2882+ This expression uses the [ RE2] ( https://github.com/google/re2/wiki/Syntax ) regular expression syntax.
2883+
2884+ <b >Signature:</b >
2885+
2886+ ``` typescript
2887+ regexFind (pattern : string ): FunctionExpression ;
2888+ ```
2889+
2890+ #### Parameters
2891+
2892+ | Parameter | Type | Description |
2893+ | --- | --- | --- |
2894+ | pattern | string | The regular expression to search for. |
2895+
2896+ <b >Returns:</b >
2897+
2898+ [ FunctionExpression] ( ./firestore_lite_pipelines.functionexpression.md#functionexpression_class )
2899+
2900+ A new [ Expression] ( ./firestore_pipelines.expression.md#expression_class ) representing the regular expression find function.
2901+
2902+ ### Example
2903+
2904+
2905+ ``` typescript
2906+ // Extract the domain from an email address
2907+ field (" email" ).regexFind (" @.+" )
2908+
2909+ ```
2910+
2911+ ## Expression.regexFind()
2912+
2913+ > This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
2914+ >
2915+
2916+ Creates an expression that returns the first substring of a string expression that matches a specified regular expression.
2917+
2918+ This expression uses the [ RE2] ( https://github.com/google/re2/wiki/Syntax ) regular expression syntax.
2919+
2920+ <b >Signature:</b >
2921+
2922+ ``` typescript
2923+ regexFind (pattern : Expression ): FunctionExpression ;
2924+ ```
2925+
2926+ #### Parameters
2927+
2928+ | Parameter | Type | Description |
2929+ | --- | --- | --- |
2930+ | pattern | [ Expression] ( ./firestore_lite_pipelines.expression.md#expression_class ) | The regular expression to search for. |
2931+
2932+ <b >Returns:</b >
2933+
2934+ [ FunctionExpression] ( ./firestore_lite_pipelines.functionexpression.md#functionexpression_class )
2935+
2936+ A new [ Expression] ( ./firestore_pipelines.expression.md#expression_class ) representing the regular expression find function.
2937+
2938+ ### Example
2939+
2940+
2941+ ``` typescript
2942+ // Extract the domain from an email address
2943+ field (" email" ).regexFind (field (" domain" ))
2944+
2945+ ```
2946+
2947+ ## Expression.regexFindAll()
2948+
2949+ > This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
2950+ >
2951+
2952+ Creates an expression that evaluates to a list of all substrings in this string expression that match a specified regular expression.
2953+
2954+ This expression uses the [ RE2] ( https://github.com/google/re2/wiki/Syntax ) regular expression syntax.
2955+
2956+ <b >Signature:</b >
2957+
2958+ ``` typescript
2959+ regexFindAll (pattern : string ): FunctionExpression ;
2960+ ```
2961+
2962+ #### Parameters
2963+
2964+ | Parameter | Type | Description |
2965+ | --- | --- | --- |
2966+ | pattern | string | The regular expression to search for. |
2967+
2968+ <b >Returns:</b >
2969+
2970+ [ FunctionExpression] ( ./firestore_lite_pipelines.functionexpression.md#functionexpression_class )
2971+
2972+ A new [ Expression] ( ./firestore_pipelines.expression.md#expression_class ) that evaluates to an array of matched substrings.
2973+
2974+ ### Example
2975+
2976+
2977+ ``` typescript
2978+ // Extract all hashtags from a post content field
2979+ field (" content" ).regexFindAll (" #[A-Za-z0-9_]+" )
2980+
2981+ ```
2982+
2983+ ## Expression.regexFindAll()
2984+
2985+ > This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
2986+ >
2987+
2988+ Creates an expression that evaluates to a list of all substrings in this string expression that match a specified regular expression.
2989+
2990+ This expression uses the [ RE2] ( https://github.com/google/re2/wiki/Syntax ) regular expression syntax.
2991+
2992+ <b >Signature:</b >
2993+
2994+ ``` typescript
2995+ regexFindAll (pattern : Expression ): FunctionExpression ;
2996+ ```
2997+
2998+ #### Parameters
2999+
3000+ | Parameter | Type | Description |
3001+ | --- | --- | --- |
3002+ | pattern | [ Expression] ( ./firestore_lite_pipelines.expression.md#expression_class ) | The regular expression to search for. |
3003+
3004+ <b >Returns:</b >
3005+
3006+ [ FunctionExpression] ( ./firestore_lite_pipelines.functionexpression.md#functionexpression_class )
3007+
3008+ A new [ Expression] ( ./firestore_pipelines.expression.md#expression_class ) that evaluates to an array of matched substrings.
3009+
3010+ ### Example
3011+
3012+
3013+ ``` typescript
3014+ // Extract all names from a post content field
3015+ field (" content" ).regexFindAll (field (" names" ))
3016+
3017+ ```
3018+
28713019## Expression.regexMatch()
28723020
28733021> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
0 commit comments