From f418de0949e6972e387887f08694d55aceff7348 Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Wed, 29 Nov 2023 14:13:22 +0000 Subject: [PATCH 01/22] searchoptions property --- .../Reference/Blocks/Text/find-text/find-all-text-block.md | 2 +- .../2023.11/Reference/Blocks/Text/find-text/find-text-block.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md index ad7aa48a6..ac031b00e 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md @@ -456,7 +456,7 @@ The [Text To Find][TextToFind Property] search query to find all occurrences of * All other characters are treated as a literal character. * `SearchOptions.Regex` allows regex text matching using [.Net Regex Syntax][Regex Syntax]. -Please note that with `SearchOptions.ContainsText` overlapping matches are detected (e.g. searching for `"aa"` in `"aaa"` matches `"aa"` at index `0` and `"aa"` at index `1`). With `SearchOptions.Regex` only `"aa"` at index `0` will be matched. +Please note that overlapping matches are not detected (i.e. searching for `"aa"` in `"aaa"` matches `"aa"` at index `0` but not `"aa"` at index `1`). | | | |--------------------|---------------------------| diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md index 9006b7c7c..b545f260f 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md @@ -489,7 +489,7 @@ For information about [supported values][Occurrences] for the [Occurrence][Occur * All other characters are treated as a literal character. * `SearchOptions.Regex` allows regex text matching using [.NET Regex Syntax][Regex Syntax]. -Please note that with `SearchOptions.ContainsText` overlapping matches are detected (e.g. searching for `"aa"` in `"aaa"` matches `"aa"` at index `0` and `"aa"` at index `1`). With `SearchOptions.Regex` only `"aa"` at index `0` will be matched. +Please note that overlapping matches are not detected (i.e. searching for `"aa"` in `"aaa"` matches `"aa"` at index `0` but not `"aa"` at index `1`). | | | |--------------------|---------------------------| From e00cf4561b90e2ffdb31d5d1c86a865d1aab56ba Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Wed, 29 Nov 2023 16:42:42 +0000 Subject: [PATCH 02/22] searchoptions data type - a start --- .../data-types/text/searchoptions.md | 124 ++++++++++++++++++ 1 file changed, 124 insertions(+) diff --git a/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md b/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md index a9e1607d4..1ec757aa4 100644 --- a/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md +++ b/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md @@ -12,28 +12,152 @@ description: "Used to define how text searches determine whether text matches th ## Summary +Used to define how text searches determine whether text matches the search (i.e. text contains the searched for text or matches the specified regex or pattern). + +`SearchOptions` is an [enum][Working with Enums] data type, which means it has a defined set of values, where each value has an associated [String][] name and [Int32][] value. + +| | | +|-|-| +| **Category:** | Text | +| **Name:** | `SearchOptions` | +| **Full Name:** | `Cortex.DataTypes.Text.SearchOptions` | +| **Alias:** | N/A | +| **Description:** | Used to define how text searches determine whether text matches the search (i.e. text contains the searched for text or matches the specified regex or pattern). | +| **Default Value:** | `(SearchOptions)0` | +| **Can be used as:** | `SearchOptions`, `Object`, `dynamic` | +| **Can be cast to:** | `Int16` (e.g. `(Int16)SearchOptions.ContainsText` or `(System.Int16)SearchOptions.ContainsText` or `(short)SearchOptions.ContainsText`) | +| | `Int32` (e.g. `(Int32)SearchOptions.ContainsText` or `(System.Int32)SearchOptions.ContainsText` or `(int)SearchOptions.ContainsText`) | +| | `Int64` (e.g. `(Int64)SearchOptions.ContainsText` or `(System.Int64)SearchOptions.ContainsText` or `(long)SearchOptions.ContainsText`) | +| | `Single` (e.g. `(Single)SearchOptions.ContainsText` or `(System.Single)SearchOptions.ContainsText` or `(float)SearchOptions.ContainsText`) | +| | `Double` (e.g. `(Double)SearchOptions.ContainsText` or `(System.Double)SearchOptions.ContainsText` or `(double)SearchOptions.ContainsText`) | + ## Values ### ContainsText +| | | +|-|-| +| **Name:** | ContainsText | +| **Value:** | [Int32][] with value `0` | +| **Notes:** | Matches text exactly with a literal character search. | + ### Regex +| | | +|-|-| +| **Name:** | Regex | +| **Value:** | [Int32][] with value `1` | +| **Notes:** | Matches text that matches the regex provided. | + ### PatternMatching +| | | +|-|-| +| **Name:** | PatternMatching | +| **Value:** | [Int32][] with value `2` | +| **Notes:** | Matches text that matches the [Pattern Matching Syntax][]. | + ## Remarks ### Create SearchOptions +The following table shows some of the ways that `SearchOptions` can be created using the expression editor. + +| Method | Example | Result | Editor Support | Notes | +|-|-|-|-|-| +| Declare a `SearchOptions` literal | `SearchOptions.ContainsText` | `SearchOptions.ContainsText` | Literal | Matches text exactly with a literal character search. | +| | `SearchOptions.Regex` | `SearchOptions.Regex` | Literal | Matches text that matches the regex provided. | +| | `SearchOptions.PatternMatching` | `SearchOptions.PatternMatching` | Literal | Empty entries are not removed but trailing and leading whitespaces are removed. | +| Use a `SearchOptions` expression | `SearchOptions.ContainsText` | `SearchOptions.ContainsText`| Expression | Empty entries are not removed.| +| | `SearchOptions.Regex` | `SearchOptions.Regex`| Expression | Empty entries are removed. | +| | `SearchOptions.PatternMatching` | `SearchOptions.PatternMatching`| Expression | Empty entries are not removed but trailing and leading whitespaces are removed. | +| Use [Explicit Casting][] | `(SearchOptions)0` | `SearchOptions.ContainsText`| Expression | Empty entries are not removed. | +| | `(SearchOptions)1` | `SearchOptions.Regex`| Expression | Empty entries are removed. | +| | `(SearchOptions)2` | `SearchOptions.PatternMatching`| Expression | Empty entries are not removed but trailing and leading whitespaces are removed. | +| Use `Enum.Parse` | `(SearchOptions)Enum.Parse(typeof(SearchOptions), "ContainsText")` | `SearchOptions.ContainsText`| Expression | Parses `"ContainsText"` and converts it to `SearchOptions.ContainsText`. See [Enum.Parse][] | +| | `(SearchOptions)Enum.Parse(typeof(SearchOptions), "Regex")` | `SearchOptions.Regex`| Expression | Parses `"Regex"` and converts it to `SearchOptions.Regex`. See [Enum.Parse][] | +| | `(SearchOptions)Enum.Parse(typeof(SearchOptions), "PatternMatching")` | `SearchOptions.PatternMatching`| Expression | Parses `"PatternMatching"` and converts it to `SearchOptions.PatternMatching`. See [Enum.Parse][] | +| Use `Enum.ToObject` | `(SearchOptions)Enum.ToObject(typeof(SearchOptions), 0)` | `SearchOptions.ContainsText`| Expression | Converts `0` to `SearchOptions.ContainsText` value. See [Enum.ToObject][] | +| | `(SearchOptions)Enum.ToObject(typeof(SearchOptions), 1)` | `SearchOptions.Regex`| Expression | Converts `1` to `SearchOptions.Regex` value. See [Enum.ToObject][] | +| | `(SearchOptions)Enum.ToObject(typeof(SearchOptions), 2)` | `SearchOptions.PatternMatching`| Expression | Converts `2` to `SearchOptions.PatternMatching` value. See [Enum.ToObject][] | + +Please see [Instantiating an enumeration type][] for further information. + ### Convert SearchOptions to Text +The following table shows some of the ways that a `SearchOptions` can be converted to text. + +| Method | Example | Result | Editor Support | Notes | +|-|-|-|-|-| +| Use `ToString` | `SearchOptions.ContainsText.ToString()` | `"ContainsText"` | Expression | Converts `SearchOptions.ContainsText` to `"ContainsText"`. See [Enum.ToString][] | +| | `SearchOptions.Regex.ToString()` | `"Regex"` | Expression | Converts `SearchOptions.Regex` to `"Regex"`. See [Enum.ToString][] | +| | `SearchOptions.PatternMatching.ToString()` | `"PatternMatching"` | Expression | Converts `SearchOptions.PatternMatching` to `"PatternMatching"`. See [Enum.ToString][] | +| Use `Convert.ToString` | `Convert.ToString(SearchOptions.ContainsText)` | `"ContainsText"` | Expression | Converts `SearchOptions.ContainsText` to `"ContainsText"`. See [Convert.ToString][] | +| | `Convert.ToString(SearchOptions.Regex)` | `"Regex"` | Expression | Converts `SearchOptions.Regex` to `"Regex"`. See [Convert.ToString][] | +| | `Convert.ToString(SearchOptions.PatternMatching)` | `"PatternMatching"` | Expression | Converts `SearchOptions.PatternMatching` to `"PatternMatching"`. See [Convert.ToString][] | +| Use `Convert Object To Text` block | where `Object` property has a value of `SearchOptions.ContainsText` | `"ContainsText"` | N/A | Converts `SearchOptions.ContainsText` to `"ContainsText"`. See [Convert Object To Text][] | +| | where `Object` property has a value of `SearchOptions.Regex` | `"Regex"` | N/A | Converts `SearchOptions.Regex` to `"Regex"`. See [Convert Object To Text][] || | where `Object` property has a value of `SearchOptions.Regex` | `"Regex"` | N/A | |Converts `SearchOptions.Regex` to `"Regex"`. See [Convert Object To Text][] | +| | where `Object` property has a value of `SearchOptions.PatternMatching` | `"PatternMatching"` | N/A | Converts `SearchOptions.PatternMatching` to `"PatternMatching"`. See [Convert Object To Text][] | +| Use `Convert Object To Json` block | where `Object` property has a value of `SearchOptions.ContainsText` | `"0"` | N/A | Converts `SearchOptions.ContainsText` to `"0"`. See [Convert Object To Json][] | +| | where `Object` property has a value of `SearchOptions.Regex` | `"1"` | N/A | Converts `SearchOptions.Regex` to `"1"`. See [Convert Object To Json][] | +| | where `Object` property has a value of `SearchOptions.PatternMatching` | `"2"` | N/A | Converts `SearchOptions.PatternMatching` to `"2"`. See [Convert Object To Json][] | + +Please see [Formatting enumeration values][] for further information. + +### Convert SearchOptions to a Number + +The following table shows some of the ways that a `SearchOptions` can be converted to a number. + +| Method | Example | Result | Editor Support | Notes | +|-|-|-|-|-| +| Use [Explicit Casting][] | `(Int32)SearchOptions.ContainsText` | `0` | Expression | [Casts][Explicit Casting] `SearchOptions.ContainsText` to `0` | +| | `(Int32)SearchOptions.Regex` | `1` | Expression | [Casts][Explicit Casting] `SearchOptions.Regex` to `1` | +| | `(Int32)SearchOptions.PatternMatching` | `2` | Expression | [Casts][Explicit Casting] `SearchOptions.PatternMatching` to `2` | +| Use `Convert.ToInt32` | `Convert.ToInt32(SearchOptions.ContainsText)` | `0` | Expression | Converts `SearchOptions.ContainsText` to `0`. See [Convert.ToInt32][] | +| | `Convert.ToInt32(SearchOptions.Regex)` | `1` | Expression | Converts `SearchOptions.Regex` to `1`. See [Convert.ToInt32][] | +| | `Convert.ToInt32(SearchOptions.PatternMatching)` | `2` | Expression | Converts `SearchOptions.PatternMatching` to `2`. See [Convert.ToInt32][] | + ### Property Editor Support +* The Expression Editor is available for [Input][] properties where the data type is `SearchOptions`. +* The Literal Editor is available for [Input][] properties where the data type is `SearchOptions`. +* The Variable Editor is available for [Input][], [InputOutput][] and [Output][] properties where the data type is `SearchOptions`. + ### Known Limitations +None + ## See Also ### Related Data Types +* [Int32][] +* [String][] + ### Related Concepts +* [Working with Enums][] +* [Explicit Casting][] + ### External Documentation + +None + +[Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} +[Output]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Output" >}} +[InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} + +[Convert Object To Text]: {{< url path="Cortex.Reference.Blocks.Objects.ConvertObject.ConvertObjectToText.MainDoc" >}} +[Convert Object To Json]: {{< url path="Cortex.Reference.Blocks.Json.ConvertJson.ConvertObjectToJson.MainDoc" >}} +[Working with Enums]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Enums.MainDoc" >}} +[Explicit Casting]: {{< url path="Cortex.Reference.Concepts.WorkingWith.Objects.ObjectCasting.ExplicitCast" >}} +[Enum.Parse]: {{< url path="MSDocs.DotNet.Api.System.Enum.Parse" >}} +[Enum.ToObject]: {{< url path="MSDocs.DotNet.Api.System.Enum.ToObject" >}} +[Enum.ToString]: {{< url path="MSDocs.DotNet.Api.System.Enum.ToString" >}} +[Convert.ToInt32]: {{< url path="MSDocs.DotNet.Api.System.Convert.ToInt32" >}} +[Convert.ToString]: {{< url path="MSDocs.DotNet.Api.System.Convert.ToString" >}} +[String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} +[Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} + +[Instantiating an enumeration type]: {{< url path="MSDocs.DotNet.Api.System.Enum.InstantiatingAnEnum" >}} +[Formatting enumeration values]: {{< url path="MSDocs.DotNet.Api.System.Enum.FormattingEnumerationValues" >}} From 6d507a77c7f418188d6ca96c25c1784ac0ccb6d0 Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Thu, 30 Nov 2023 12:49:09 +0000 Subject: [PATCH 03/22] searchoptions datatype --- .../Reference/data-types/text/searchoptions.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md b/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md index 1ec757aa4..b4f53b586 100644 --- a/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md +++ b/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md @@ -8,8 +8,6 @@ description: "Used to define how text searches determine whether text matches th

(Cortex.DataTypes.Text.SearchOptions)

-{{< workinprogress >}} - ## Summary Used to define how text searches determine whether text matches the search (i.e. text contains the searched for text or matches the specified regex or pattern). @@ -47,7 +45,7 @@ Used to define how text searches determine whether text matches the search (i.e. |-|-| | **Name:** | Regex | | **Value:** | [Int32][] with value `1` | -| **Notes:** | Matches text that matches the regex provided. | +| **Notes:** | Matches text that matches the [Regex][Regex Syntax] provided. | ### PatternMatching @@ -55,7 +53,7 @@ Used to define how text searches determine whether text matches the search (i.e. |-|-| | **Name:** | PatternMatching | | **Value:** | [Int32][] with value `2` | -| **Notes:** | Matches text that matches the [Pattern Matching Syntax][]. | +| **Notes:** | Matches text that matches the [Pattern Matching Syntax][] provided. | ## Remarks @@ -67,13 +65,13 @@ The following table shows some of the ways that `SearchOptions` can be created u |-|-|-|-|-| | Declare a `SearchOptions` literal | `SearchOptions.ContainsText` | `SearchOptions.ContainsText` | Literal | Matches text exactly with a literal character search. | | | `SearchOptions.Regex` | `SearchOptions.Regex` | Literal | Matches text that matches the regex provided. | -| | `SearchOptions.PatternMatching` | `SearchOptions.PatternMatching` | Literal | Empty entries are not removed but trailing and leading whitespaces are removed. | +| | `SearchOptions.PatternMatching` | `SearchOptions.PatternMatching` | Literal | Matches text that matches the regex provided, see [Regex Syntax][]. | | Use a `SearchOptions` expression | `SearchOptions.ContainsText` | `SearchOptions.ContainsText`| Expression | Empty entries are not removed.| | | `SearchOptions.Regex` | `SearchOptions.Regex`| Expression | Empty entries are removed. | -| | `SearchOptions.PatternMatching` | `SearchOptions.PatternMatching`| Expression | Empty entries are not removed but trailing and leading whitespaces are removed. | +| | `SearchOptions.PatternMatching` | `SearchOptions.PatternMatching`| Expression | Matches text that matches the regex provided, see [Regex Syntax][]. | | Use [Explicit Casting][] | `(SearchOptions)0` | `SearchOptions.ContainsText`| Expression | Empty entries are not removed. | | | `(SearchOptions)1` | `SearchOptions.Regex`| Expression | Empty entries are removed. | -| | `(SearchOptions)2` | `SearchOptions.PatternMatching`| Expression | Empty entries are not removed but trailing and leading whitespaces are removed. | +| | `(SearchOptions)2` | `SearchOptions.PatternMatching`| Expression | Matches text that matches the regex provided, see [Regex Syntax][]. | | Use `Enum.Parse` | `(SearchOptions)Enum.Parse(typeof(SearchOptions), "ContainsText")` | `SearchOptions.ContainsText`| Expression | Parses `"ContainsText"` and converts it to `SearchOptions.ContainsText`. See [Enum.Parse][] | | | `(SearchOptions)Enum.Parse(typeof(SearchOptions), "Regex")` | `SearchOptions.Regex`| Expression | Parses `"Regex"` and converts it to `SearchOptions.Regex`. See [Enum.Parse][] | | | `(SearchOptions)Enum.Parse(typeof(SearchOptions), "PatternMatching")` | `SearchOptions.PatternMatching`| Expression | Parses `"PatternMatching"` and converts it to `SearchOptions.PatternMatching`. See [Enum.Parse][] | @@ -159,5 +157,8 @@ None [String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} [Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} +[Regex Syntax]: {{}} +[Pattern Matching Syntax]: {{}} + [Instantiating an enumeration type]: {{< url path="MSDocs.DotNet.Api.System.Enum.InstantiatingAnEnum" >}} [Formatting enumeration values]: {{< url path="MSDocs.DotNet.Api.System.Enum.FormattingEnumerationValues" >}} From 83a7f7c3696b92c6c5a718d2626d1763e2d87e2b Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Mon, 4 Dec 2023 09:46:17 +0000 Subject: [PATCH 04/22] find text block changes --- .../Text/find-text/find-all-text-block.md | 119 ++++++++--- .../Blocks/Text/find-text/find-text-block.md | 202 ++++++++++++++---- 2 files changed, 255 insertions(+), 66 deletions(-) diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md index ac031b00e..3e6c7c3cf 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md @@ -19,7 +19,7 @@ Finds all occurrences of [Text To Find][TextToFind Property] in a given [Text][T ### Find all occurrences of Text To Find (Ordinal) -This example will find all occurrences of `"The"` in `"The quick brown fox jumps over the lazy dog"`. +This example will find all occurrences of `"The"` in `"The quick brown fox jumps over the lazy dog."`. It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. @@ -27,7 +27,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | | [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "The", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | @@ -35,7 +35,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. #### Result -As this example is performing a [case-sensitive, culture-insensitive][Ordinal] comparison of text, `"The quick brown fox jumps over the lazy dog"` only contains the text `"The"` once; `"the"` has a different case so does not match. Therefore, the variable `($)Matches` will be set to the following: +As this example is performing a [case-sensitive, culture-insensitive][Ordinal] comparison of text, `"The quick brown fox jumps over the lazy dog."` only contains the text `"The"` once; `"the"` has a different case so does not match. Therefore, the variable `($)Matches` will be set to the following: ```json [ @@ -77,7 +77,7 @@ As this example is performing a [case-sensitive, culture-insensitive][Ordinal] c ### Find all occurrences of Text To Find (Ordinal Ignore Case) -This example will find all occurrences of `"The"` in `"The quick brown fox jumps over the lazy dog"`. +This example will find all occurrences of `"The"` in `"The quick brown fox jumps over the lazy dog."`. It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text. @@ -85,7 +85,7 @@ It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] compari | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | | [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "The", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | @@ -93,7 +93,7 @@ It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] compari #### Result -As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog"` contains the text `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. Therefore, the variable `($)Matches` will be updated to the following: +As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog."` contains the text `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. Therefore, the variable `($)Matches` will be updated to the following: ```json [ @@ -166,7 +166,7 @@ As this example is performing a [case-insensitive, culture-insensitive][OrdinalI ### Find all occurrences that match the pattern in Text To Find -This example will find all occurrences of text that match a pattern containing `"?he"` in `"The quick brown fox jumps over the lazy dog"`. +This example will find all occurrences of text that match a pattern containing `"?he"` in `"The quick brown fox jumps over the lazy dog."`. It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. @@ -174,7 +174,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | | [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "?he", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "?he", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.PatternMatching` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | @@ -182,7 +182,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. #### Result -`"The quick brown fox jumps over the lazy dog"` contains `"The"` and `"the"` that matches the pattern `"?he"`. Therefore, the variable `($)Matches` will be set to the following: +`"The quick brown fox jumps over the lazy dog."` contains `"The"` and `"the"` that matches the pattern `"?he"`. Therefore, the variable `($)Matches` will be set to the following: ```json [ @@ -255,7 +255,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. ### Find all occurrences that match the regex in Text To Find -This example will find all occurrences of text that match the regex `"^The"` from `"The quick brown fox jumps over the lazy dog"`. +This example will find all occurrences of text that match the regex `"^The"` from `"The quick brown fox jumps over the lazy dog."`. It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. @@ -263,7 +263,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | | [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "^The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "^The", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | @@ -271,7 +271,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. #### Result -`"The quick brown fox jumps over the lazy dog"` contains `"The"` at the start of the sentence that matches the regex `"^The"`. Therefore, the variable `($)Matches` will be set to the following: +`"The quick brown fox jumps over the lazy dog."` contains `"The"` at the start of the sentence that matches the regex `"^The"`. Therefore, the variable `($)Matches` will be set to the following: ```json [ @@ -311,9 +311,9 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. *** -### Find all occurrences that start with and end with a Text To Find in Text +### Find all occurrences that start with and end with a regex Text To Find in Text -This example will find all occurrences of text that start with `"The"` and end with `"jumps"` from `"The quick brown fox jumps over the lazy dog."`. +This example will find the first occurrence of text that matches a regex that starts with `"The"`, contains `.*?` and ends with `"jumps"` from `"The quick brown fox jumps over the lazy dog."`. It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. @@ -321,15 +321,15 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "The", "contains": "", "endsWith": "jumps"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "The", contains: "", endsWith:"jumps")` | `($)TextToFind` is a variable of type [TextToFind][] | -| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "The", "contains": ".*?", "endsWith": "jumps"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "The", contains: ".*?", endsWith:"jumps")` | `($)TextToFind` is a variable of type [TextToFind][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | | [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [List][]<[Match][]> value | #### Result -`"The quick brown fox jumps over the lazy dog"` contains 1 occurrence starting with `"The"` and ending with `"jumps"`, which is `"The quick brown fox jumps"` Therefore, the variable `($)Matches` will be set to the following: +`"The quick brown fox jumps over the lazy dog."` contains 1 occurrence starting with `"The"` and ending with `"jumps"`, which is `"The quick brown fox jumps"` Therefore, the variable `($)Matches` will be set to the following: ```json [ @@ -407,6 +407,76 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. *** +### Find all occurrences that starts with a wildcard and ends with a regex Text To Find in Text + +This example will find all occurrences of text that start with the wildcard regex `".*?"` and end with `"o"` from `"The quick brown fox jumps over the lazy dog."`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog. The dog woke up and tried to bite the fox. The fox jumps to get away."` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": ".*?", "contains": "", "endsWith": "o"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: ".*?", contains: null, endsWith:"o")` | `($)TextToFind` is a variable of type [TextToFind][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [List][]<[Match][]> value | + +#### Result + +`"The quick brown fox jumps over the lazy dog."` has 4 occurrences starting with `"o"` and ending with the wildcard regex `".+?"`. Therefore the variable `($)Matches` will be set to the following: + +```json +[ + { + "Value": "ow", + "Index": 12, + "Length": 2, + "Groups": { + "0": { + "Value": "ow", + "Index": 12, + "Length": 2, + "Captures": [ + { + "Value": "ow", + "Index": 12, + "Length": 2 + } + ] + }, + "startsWith": { + "Value": "o", + "Index": 12, + "Length": 1, + "Captures": [ + { + "Value": "o", + "Index": 12, + "Length": 1 + } + ] + }, + "endsWith": { + "Value": "w", + "Index": 13, + "Length": 1, + "Captures": [ + { + "Value": "w", + "Index": 13, + "Length": 1 + } + ] + } + } + } +] +``` + +*** + ## Properties ### Text @@ -519,20 +589,11 @@ If all properties of [Text To Find][TextToFind Property] are `null` or empty (i. ### Null or empty property of Text To Find -If at least one, but not all properties of [Text To Find][TextToFind Property] are `null` or empty (i.e. `""`), then that section of the query is not included as a specific [Group][] in the returned [Match][]; see [Find all occurrences that start with and end with a Text To Find in Text][]. -There exist two special cases involving the [Contains][] nested property of [Text To Find][TextToFind Property]; see below. - -#### Empty contains property of Text To Find - -If the [Contains][] nested property of [Text To Find][TextToFind Property] is empty (i.e. `""`), and both the [StartsWith][] and [EndsWith][] nested properties are not null, then a valid match will be one starting with [StartsWith][], and ending with [EndsWith][], including of any content between the two groups; see [Find all occurrences that start with and end with a Text To Find in Text][]. - -#### Null contains property of Text To Find - -If the [Contains][] nested property of [Text To Find][TextToFind Property] is `null`, and both the [StartsWith][] and [EndsWith][] nested properties are not null, then a valid match will be one starting with [StartsWith][], and ending with [EndsWith][], with no content between the two groups, i.e. an exact match only; see [Find all occurrences that start with and end with a Text To Find in Text (Null contains)][]. +If a property of [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), then that section of the query is not considered for a valid match and is not included as a specific [Group][] in the returned [Match][]; see [Find all occurrences that start with and end with a Text To Find in Text][]. ### Known Limitations -If [Search Options][SearchOptions Property] is set to `SearchOptions.Regex` or `SearchOptions.PatternMatching` and [Comparison Type][ComparisonType Property] is set to `StringComparison.CurrentCulture`, some characters such as `æ` that is equivalent to `ae` may not evaluate as equal. +If [Comparison Type][ComparisonType Property] is set to `StringComparison.CurrentCulture`, some characters such as `æ` that are equivalent to `ae` may not evaluate as equal. [Matches Property]: {{< ref "#matches" >}} [Text Property]: {{< ref "#text" >}} diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md index b545f260f..9b5b10bfc 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md @@ -19,7 +19,7 @@ Finds the specified [Occurrence][Occurrence Property] of [Text To Find][TextToFi ### Find the first Occurrence of Text To Find (Ordinal) -This example will find the first occurrence of `"The"` in `"The quick brown fox jumps over the lazy dog"`. +This example will find the first occurrence of `"The"` in `"The quick brown fox jumps over the lazy dog."`. It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. @@ -27,7 +27,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | | [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "The", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | @@ -36,7 +36,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. #### Result -As this example is performing a [case-sensitive, culture-insensitive][Ordinal] comparison of text, `"The quick brown fox jumps over the lazy dog"` only contains the text `"The"` once; `"the"` has a different case so does not match. Therefore, the variable `($)Match` will be set to the following: +As this example is performing a [case-sensitive, culture-insensitive][Ordinal] comparison of text, `"The quick brown fox jumps over the lazy dog."` only contains the text `"The"` once; `"the"` has a different case so does not match. Therefore, the variable `($)Match` will be set to the following: ```json { @@ -76,7 +76,7 @@ As this example is performing a [case-sensitive, culture-insensitive][Ordinal] c ### Find the second Occurrence of Text To Find (Ordinal Ignore Case) -This example will find the second occurrence of `"The"` in `"The quick brown fox jumps over the lazy dog"`. +This example will find the second occurrence of `"The"` in `"The quick brown fox jumps over the lazy dog."`. It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text. @@ -84,7 +84,7 @@ It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] compari | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | | [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "The", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Occurrence][Occurrence Property] | `($)Occurrence`, with value `2` | `($)Occurrence` is a variable of type [Int32][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | @@ -93,7 +93,7 @@ It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] compari #### Result -As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog"` contains the text `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. Therefore, the variable `($)Match` will be set to the following: +As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog."` contains the text `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. Therefore, the variable `($)Match` will be set to the following: ```json { @@ -133,7 +133,7 @@ As this example is performing a [case-insensitive, culture-insensitive][OrdinalI ### Find the last Occurrence of Text To Find -This example will find the last occurrence of `"The"` in `"The quick brown fox jumps over the lazy dog"`. +This example will find the last occurrence of `"The"` in `"The quick brown fox jumps over the lazy dog."`. It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text. @@ -141,7 +141,7 @@ It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] compari | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | | [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "The", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Occurrence][Occurrence Property] | `($)Occurrence`, with value `-1` | `($)Occurrence` is a variable of type [Int32][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | @@ -150,7 +150,7 @@ It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] compari #### Result -As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog"` contains the text `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. The second occurrence is the last occurrence, and therefore, the variable `($)Match` will be set to the following: +As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog."` contains the text `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. The second occurrence is the last occurrence, and therefore, the variable `($)Match` will be set to the following: ```json { @@ -190,7 +190,7 @@ As this example is performing a [case-insensitive, culture-insensitive][OrdinalI ### Find an invalid Occurrence of Text To Find -This example will find the third occurrence of `"The"`, which is not present, in `"The quick brown fox jumps over the lazy dog"`. +This example will find the third occurrence of `"The"`, which is not present, in `"The quick brown fox jumps over the lazy dog."`. It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text. @@ -198,7 +198,7 @@ It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] compari | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | | [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "The", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Occurrence][Occurrence Property] | `($)Occurrence`, with value `3` | `($)Occurrence` is a variable of type [Int32][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | @@ -207,7 +207,7 @@ It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] compari #### Result -As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog"` contains the text `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. There is no match for the third [Occurrence][Occurrence Property]. Therefore, the variable `($)Match` will be set to the following: +As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog."` contains the text `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. There is no match for the third [Occurrence][Occurrence Property]. Therefore, the variable `($)Match` will be set to the following: ```json null @@ -217,7 +217,7 @@ null ### Find the first Occurrence that matches the pattern in Text To Find -This example will find the first occurrence of text that match a pattern containing `"?he"` in `"The quick brown fox jumps over the lazy dog"`. +This example will find the first occurrence of text that match a pattern containing `"?he"` in `"The quick brown fox jumps over the lazy dog."`. It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. @@ -225,7 +225,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | | [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "?he", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "?he", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.PatternMatching` | `($)SearchOptions` is a variable of type [SearchOptions][] | @@ -234,7 +234,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. #### Result -`"The quick brown fox jumps over the lazy dog"` contains `"The"` and `"the"` that matches the pattern `"?he"`. Of these, `"The"` is found first in the [Text][Text Property]. Therefore, the variable `($)Match` will be set to the following: +`"The quick brown fox jumps over the lazy dog."` contains `"The"` and `"the"` that matches the pattern `"?he"`. Of these, `"The"` is found first in the [Text][Text Property]. Therefore, the variable `($)Match` will be set to the following: ```json { @@ -274,7 +274,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. ### Find the first Occurrence that matches the regex in Text To Find -This example will find the first occurrence of text that match the regex `"^The"` from `"The quick brown fox jumps over the lazy dog"`. +This example will find the first occurrence of text that match the regex `"^The"` from `"The quick brown fox jumps over the lazy dog."`. It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. @@ -282,7 +282,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | | [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "^The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "^The", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | @@ -291,7 +291,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. #### Result -`"The quick brown fox jumps over the lazy dog"` contains `"The"` at the start of the sentence that matches the regex `"^The"`. Therefore, the variable `($)Match` will be set to the following: +`"The quick brown fox jumps over the lazy dog."` contains `"The"` at the start of the sentence that matches the regex `"^The"`. Therefore, the variable `($)Match` will be set to the following: ```json { @@ -329,9 +329,9 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. *** -### Find the first Occurrence that starts with and ends with a Text To Find in Text +### Find the first Occurrence that starts with and ends with a regex Text To Find in Text -This example will find the first occurrence of text that starts with `"The"` and ends with `"jumps"` from `"The quick brown fox jumps over the lazy dog."`. +This example will find the first occurrence of text that matches a regex that starts with `"The"`, contains `.*?` and ends with `"jumps"` from `"The quick brown fox jumps over the lazy dog."`. It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. @@ -339,16 +339,16 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog"` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "The", "contains": "", "endsWith": "jumps"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "The", contains: "", endsWith:"jumps")` | `($)TextToFind` is a variable of type [TextToFind][] | +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "The", "contains": ".*?", "endsWith": "jumps"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "The", contains: ".*?", endsWith:"jumps")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | -| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | | [Match][Match Property] | `($)Match`, with no value | `($)Match` is a variable that will be set to an [Match][] value | #### Result -`"The quick brown fox jumps over the lazy dog"` contains one occurrence starting with `"The"` and ending with `"jumps"`, which is `"The quick brown fox jumps"` Therefore, the variable `($)Match` will be set to the following: +`"The quick brown fox jumps over the lazy dog."` contains one occurrence matching a regex starting with `"The"`, containing `.*?` which matches `" quick brown fox "`, and ending with `"jumps"`, which is `"The quick brown fox jumps"`. Therefore, the variable `($)Match` will be set to the following: ```json { @@ -400,7 +400,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. ### Find the first Occurrence that starts with and ends with a Text To Find in Text (Null contains) -This example will find the first occurrence of text that start with `"The"`, contains `null` and ends with `"jumps"` from `"The quick brown fox jumps over the lazy dog."`. To clarify, this [Text To Find][TextToFind Property] input is searching for matches of `"Thejumps"` exactly in [Text][Text Property]. +This example will find the first occurrence of text that starts with `"The"`, contains `null` and ends with `"jumps"` from `"The quick brown fox jumps over the lazy dog."`. To clarify, this [Text To Find][TextToFind Property] input is searching for matches of `"Thejumps"` exactly in [Text][Text Property]. It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. @@ -425,6 +425,144 @@ null *** +### Find the first Occurrence that starts with a wildcard and ends with a regex Text To Find in Text + +This example will find the first occurrence of text that matches a regex that starts with `".*?"` and ends with `"o"` in `"The quick brown fox jumps over the lazy dog."`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": ".*?", "contains": "", "endsWith": "o"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: ".*?", contains: null, endsWith:"o")` | `($)TextToFind` is a variable of type [TextToFind][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Match][Match Property] | `($)Match`, with no value | `($)Match` is a variable that will be set to an [Match][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog."` has 4 occurrences ending with `"o"`, and starting with the wildcard regex `".*?"`. The first of these is `"The quick bro"`. Therefore, the variable `($)Match` will be set to the following: + +```json +{ + "Value": "The quick bro", + "Index": 0, + "Length": 13, + "Groups": { + "0": { + "Value": "The quick bro", + "Index": 0, + "Length": 13, + "Captures": [ + { + "Value": "The quick bro", + "Index": 0, + "Length": 13 + } + ] + }, + "startsWith": { + "Value": "", + "Index": 0, + "Length": 0, + "Captures": [ + { + "Value": "", + "Index": 0, + "Length": 0 + } + ] + }, + "endsWith": { + "Value": "o", + "Index": 12, + "Length": 1, + "Captures": [ + { + "Value": "o", + "Index": 12, + "Length": 1 + } + ] + } + } +} +``` + +*** + +### Find the first Occurrence that starts with a regex and ends with a wildcard Text To Find in Text + +This example will find the first occurrence of text that matches a regex that starts with `"o"` and ends with `".+?"`, `"The quick brown fox jumps over the lazy dog.`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "o", "contains": "", "endsWith": ".+?"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "o", contains: null, endsWith:".+?")` | `($)TextToFind` is a variable of type [TextToFind][] | +| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Match][Match Property] | `($)Match`, with no value | `($)Match` is a variable that will be set to an [Match][] value | + +#### Result + +`"The quick brown fox jumps over the lazy dog."` has 4 occurrences starting with `"o"` and ending with the wildcard regex `".+?"`. The first of these is `"o"`. Therefore the variable `($)Match` will be set to the following: + +```json +{ + "Value": "ow", + "Index": 12, + "Length": 2, + "Groups": { + "0": { + "Value": "ow", + "Index": 12, + "Length": 2, + "Captures": [ + { + "Value": "ow", + "Index": 12, + "Length": 2 + } + ] + }, + "startsWith": { + "Value": "o", + "Index": 12, + "Length": 1, + "Captures": [ + { + "Value": "o", + "Index": 12, + "Length": 1 + } + ] + }, + "endsWith": { + "Value": "w", + "Index": 13, + "Length": 1, + "Captures": [ + { + "Value": "w", + "Index": 13, + "Length": 1 + } + ] + } + } +} +``` + +*** + ## Properties ### Text @@ -477,7 +615,6 @@ For information about [supported values][Occurrences] for the [Occurrence][Occur | Default Editor | [Literal][] | | Default Value | `1` | - ### Search Options [Search Options][SearchOptions Property] can be specified to choose whether [Text To Find][TextToFind Property] should be interpreted as a ContainsText, PatternMatching or Regex search: @@ -489,7 +626,7 @@ For information about [supported values][Occurrences] for the [Occurrence][Occur * All other characters are treated as a literal character. * `SearchOptions.Regex` allows regex text matching using [.NET Regex Syntax][Regex Syntax]. -Please note that overlapping matches are not detected (i.e. searching for `"aa"` in `"aaa"` matches `"aa"` at index `0` but not `"aa"` at index `1`). +Please note that overlapping matches are not detected (i.e. searching for `"aa"` in `"aaa"` matches `"aa"` at index `0` but not `"aa"` at index `1`). | | | |--------------------|---------------------------| @@ -552,16 +689,7 @@ If all properties of [Text To Find][TextToFind Property] are `null` or empty (i. ### Null or empty property of Text To Find -If at least one, but not all properties of [Text To Find][TextToFind Property] are `null` or empty (i.e. `""`), then that section of the query is not included as a specific [Group][] in the returned [Match][]; see [Find the first Occurrence that starts with and ends with a Text To Find in Text][]. -There exist two special cases involving the [Contains][] nested property of [Text To Find][TextToFind Property]; see below. - -#### Empty contains property of Text To Find - -If the [Contains][] nested property of [Text To Find][TextToFind Property] is empty (i.e. `""`), and both the [StartsWith][] and [EndsWith][] nested properties are not null, then a valid match will be one starting with [StartsWith][], and ending with [EndsWith][], including any content between the two groups; see [Find the first Occurrence that starts with and ends with a Text To Find in Text][]. - -#### Null contains property of Text To Find - -If the [Contains][] nested property of [Text To Find][TextToFind Property] is `null`, and both the [StartsWith][] and [EndsWith][] nested properties are not null, then a valid match will be one starting with [StartsWith][], and ending with [EndsWith][], with no content between the two groups, i.e. an exact match only; see [Find the first Occurrence that starts with and ends with a Text To Find in Text (Null contains)][]. +If a property of [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), then that section of the query is not considered for a valid match and is not included as a specific [Group][] in the returned [Match][]; see [Find the first Occurrence that starts with and ends with a Text To Find in Text][]. ### Known Limitations From cb589e5223bf01eaf5935628a8f437a7efffaec4 Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Mon, 4 Dec 2023 09:59:53 +0000 Subject: [PATCH 05/22] advanced property changes --- .../en/docs/2023.11/Reference/data-types/text/texttofind.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/docs/2023.11/Reference/data-types/text/texttofind.md b/content/en/docs/2023.11/Reference/data-types/text/texttofind.md index 607cb1ab1..b492c07e6 100644 --- a/content/en/docs/2023.11/Reference/data-types/text/texttofind.md +++ b/content/en/docs/2023.11/Reference/data-types/text/texttofind.md @@ -32,7 +32,7 @@ The `TextToFind` data type is used to represent a search query for finding text. | | | |--------------------|---------------------------| | Data Type | [String][] | -| Is [Advanced][] | `true` | +| Is [Advanced][] | `false` | | Default Editor | [Expression][] | | Default Value | [String][] with value `$@""` | @@ -54,7 +54,7 @@ The `TextToFind` data type is used to represent a search query for finding text. | | | |--------------------|---------------------------| | Data Type | [String][] | -| Is [Advanced][] | `true` | +| Is [Advanced][] | `false` | | Default Editor | [Expression][] | | Default Value | [String][] with value `$@""` | From 1c13c76637d11bd93b88f4ef5089990f200dda97 Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Mon, 4 Dec 2023 10:18:36 +0000 Subject: [PATCH 06/22] add missing example, fix wrong result example --- .../Text/find-text/find-all-text-block.md | 338 +++++++++++++++++- 1 file changed, 332 insertions(+), 6 deletions(-) diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md index 3e6c7c3cf..02de16b9e 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md @@ -407,9 +407,9 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. *** -### Find all occurrences that starts with a wildcard and ends with a regex Text To Find in Text +### Find all occurrences that start with a wildcard and end with a regex Text To Find in Text -This example will find all occurrences of text that start with the wildcard regex `".*?"` and end with `"o"` from `"The quick brown fox jumps over the lazy dog."`. +This example will find all occurrences of text that start with a wildcard regex `".*?"` and end with `"o"` from `"The quick brown fox jumps over the lazy dog."`. It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. @@ -417,7 +417,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog. The dog woke up and tried to bite the fox. The fox jumps to get away."` | `($)Text` is a variable of type [String][] | +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | | [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": ".*?", "contains": "", "endsWith": "o"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: ".*?", contains: null, endsWith:"o")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | @@ -425,7 +425,206 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. #### Result -`"The quick brown fox jumps over the lazy dog."` has 4 occurrences starting with `"o"` and ending with the wildcard regex `".+?"`. Therefore the variable `($)Matches` will be set to the following: +`"The quick brown fox jumps over the lazy dog."` has 4 occurrences starting with the wildcard regex `".*?"` and ending with `"o"`. Therefore the variable `($)Matches` will be set to the following: + +```json +[ + { + "Value": "The quick bro", + "Index": 0, + "Length": 13, + "Groups": { + "0": { + "Value": "The quick bro", + "Index": 0, + "Length": 13, + "Captures": [ + { + "Value": "The quick bro", + "Index": 0, + "Length": 13 + } + ] + }, + "startsWith": { + "Value": "The quick br", + "Index": 0, + "Length": 12, + "Captures": [ + { + "Value": "The quick br", + "Index": 0, + "Length": 12 + } + ] + }, + "endsWith": { + "Value": "o", + "Index": 12, + "Length": 1, + "Captures": [ + { + "Value": "o", + "Index": 12, + "Length": 1 + } + ] + } + } + }, + { + "Value": "wn fo", + "Index": 13, + "Length": 5, + "Groups": { + "0": { + "Value": "wn fo", + "Index": 13, + "Length": 5, + "Captures": [ + { + "Value": "wn fo", + "Index": 13, + "Length": 5 + } + ] + }, + "startsWith": { + "Value": "wn f", + "Index": 13, + "Length": 4, + "Captures": [ + { + "Value": "wn f", + "Index": 13, + "Length": 4 + } + ] + }, + "endsWith": { + "Value": "o", + "Index": 17, + "Length": 1, + "Captures": [ + { + "Value": "o", + "Index": 17, + "Length": 1 + } + ] + } + } + }, + { + "Value": "x jumps o", + "Index": 18, + "Length": 9, + "Groups": { + "0": { + "Value": "x jumps o", + "Index": 18, + "Length": 9, + "Captures": [ + { + "Value": "x jumps o", + "Index": 18, + "Length": 9 + } + ] + }, + "startsWith": { + "Value": "x jumps ", + "Index": 18, + "Length": 8, + "Captures": [ + { + "Value": "x jumps ", + "Index": 18, + "Length": 8 + } + ] + }, + "endsWith": { + "Value": "o", + "Index": 26, + "Length": 1, + "Captures": [ + { + "Value": "o", + "Index": 26, + "Length": 1 + } + ] + } + } + }, + { + "Value": "ver the lazy do", + "Index": 27, + "Length": 15, + "Groups": { + "0": { + "Value": "ver the lazy do", + "Index": 27, + "Length": 15, + "Captures": [ + { + "Value": "ver the lazy do", + "Index": 27, + "Length": 15 + } + ] + }, + "startsWith": { + "Value": "ver the lazy d", + "Index": 27, + "Length": 14, + "Captures": [ + { + "Value": "ver the lazy d", + "Index": 27, + "Length": 14 + } + ] + }, + "endsWith": { + "Value": "o", + "Index": 41, + "Length": 1, + "Captures": [ + { + "Value": "o", + "Index": 41, + "Length": 1 + } + ] + } + } + } +] +``` + +*** + +### Find all occurrences that start with a regex and end with a wildcard Text to Find in Text + +This example will find all occurrences of text that start with `"o"` and end with a wildcard regex `".+?"` from `"The quick brown fox jumps over the lazy dog."`. + +It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. + +#### Properties + +| Property | Value | Notes | +|--------------------|---------------------------|------------------------------------------| +| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "o", "contains": "", "endsWith": ".+?"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "o", contains: null, endsWith:".+?")` | `($)TextToFind` is a variable of type [TextToFind][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [List][]<[Match][]> value | + +#### Result + +`"The quick brown fox jumps over the lazy dog."` has 4 occurrences starting with `"o"` and ending with `".+?"`. Therefore the variable `($)Matches` will be set to the following: ```json [ @@ -471,12 +670,139 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. ] } } + }, + { + "Value": "ox", + "Index": 17, + "Length": 2, + "Groups": { + "0": { + "Value": "ox", + "Index": 17, + "Length": 2, + "Captures": [ + { + "Value": "ox", + "Index": 17, + "Length": 2 + } + ] + }, + "startsWith": { + "Value": "o", + "Index": 17, + "Length": 1, + "Captures": [ + { + "Value": "o", + "Index": 17, + "Length": 1 + } + ] + }, + "endsWith": { + "Value": "x", + "Index": 18, + "Length": 1, + "Captures": [ + { + "Value": "x", + "Index": 18, + "Length": 1 + } + ] + } + } + }, + { + "Value": "ov", + "Index": 26, + "Length": 2, + "Groups": { + "0": { + "Value": "ov", + "Index": 26, + "Length": 2, + "Captures": [ + { + "Value": "ov", + "Index": 26, + "Length": 2 + } + ] + }, + "startsWith": { + "Value": "o", + "Index": 26, + "Length": 1, + "Captures": [ + { + "Value": "o", + "Index": 26, + "Length": 1 + } + ] + }, + "endsWith": { + "Value": "v", + "Index": 27, + "Length": 1, + "Captures": [ + { + "Value": "v", + "Index": 27, + "Length": 1 + } + ] + } + } + }, + { + "Value": "og", + "Index": 41, + "Length": 2, + "Groups": { + "0": { + "Value": "og", + "Index": 41, + "Length": 2, + "Captures": [ + { + "Value": "og", + "Index": 41, + "Length": 2 + } + ] + }, + "startsWith": { + "Value": "o", + "Index": 41, + "Length": 1, + "Captures": [ + { + "Value": "o", + "Index": 41, + "Length": 1 + } + ] + }, + "endsWith": { + "Value": "g", + "Index": 42, + "Length": 1, + "Captures": [ + { + "Value": "g", + "Index": 42, + "Length": 1 + } + ] + } + } } ] ``` -*** - ## Properties ### Text From 204eb2f841988de7295198952eda36eb2f130fc9 Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Mon, 4 Dec 2023 11:23:25 +0000 Subject: [PATCH 07/22] fix typo from copypaste --- .../Reference/Blocks/Text/find-text/find-all-text-block.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md index 02de16b9e..17877c944 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md @@ -313,7 +313,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. ### Find all occurrences that start with and end with a regex Text To Find in Text -This example will find the first occurrence of text that matches a regex that starts with `"The"`, contains `.*?` and ends with `"jumps"` from `"The quick brown fox jumps over the lazy dog."`. +This example will find all occurrences of text that matches a regex that starts with `"The"`, contains `.*?` and ends with `"jumps"` from `"The quick brown fox jumps over the lazy dog."`. It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. From fbf9715490377c7320081f9f8592082803fb7f60 Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Mon, 4 Dec 2023 11:37:03 +0000 Subject: [PATCH 08/22] fix refs --- .../Reference/Blocks/Text/find-text/find-all-text-block.md | 4 ++-- .../Reference/Blocks/Text/find-text/find-text-block.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md index 17877c944..c9403f110 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md @@ -915,7 +915,7 @@ If all properties of [Text To Find][TextToFind Property] are `null` or empty (i. ### Null or empty property of Text To Find -If a property of [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), then that section of the query is not considered for a valid match and is not included as a specific [Group][] in the returned [Match][]; see [Find all occurrences that start with and end with a Text To Find in Text][]. +If a property of [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), then that section of the query is not considered for a valid match and is not included as a specific [Group][] in the returned [Match][]; see [Find all occurrences that start with and end with a Text To Find in Text (Null contains)][]. ### Known Limitations @@ -926,7 +926,7 @@ If [Comparison Type][ComparisonType Property] is set to `StringComparison.Curren [TextToFind Property]: {{< ref "#text-to-find" >}} [SearchOptions Property]: {{< ref "#search-options" >}} [ComparisonType Property]: {{< ref "#comparison-type" >}} -[Find all occurrences that start with and end with a Text To Find in Text]: {{}} +[Find all occurrences that start with and end with a regex Text To Find in Text]: {{}} [Find all occurrences that start with and end with a Text To Find in Text (Null contains)]: {{}} [Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md index 9b5b10bfc..b0b7381d3 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md @@ -689,7 +689,7 @@ If all properties of [Text To Find][TextToFind Property] are `null` or empty (i. ### Null or empty property of Text To Find -If a property of [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), then that section of the query is not considered for a valid match and is not included as a specific [Group][] in the returned [Match][]; see [Find the first Occurrence that starts with and ends with a Text To Find in Text][]. +If a property of [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), then that section of the query is not considered for a valid match and is not included as a specific [Group][] in the returned [Match][]; see [Find the first Occurrence that starts with and ends with a Text To Find in Text (Null contains)][]. ### Known Limitations @@ -701,7 +701,7 @@ If [Search Options][SearchOptions Property] is set to `SearchOptions.Regex` or ` [TextToFind Property]: {{< ref "#text-to-find" >}} [SearchOptions Property]: {{< ref "#search-options" >}} [ComparisonType Property]: {{< ref "#comparison-type" >}} -[Find the first Occurrence that starts with and ends with a Text To Find in Text]: {{}} +[Find the first Occurrence that starts with and ends with a regex Text To Find in Text]: {{}} [Find the first Occurrence that starts with and ends with a Text To Find in Text (Null contains)]: {{}} [Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} From f43b2496f3f8c5775b55a5e83b31aa29e15ae87c Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Mon, 4 Dec 2023 11:46:16 +0000 Subject: [PATCH 09/22] fix links, add relevant example in remarks --- .../Reference/Blocks/Text/find-text/find-all-text-block.md | 3 ++- .../2023.11/Reference/Blocks/Text/find-text/find-text-block.md | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md index c9403f110..aaadd9c2a 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md @@ -915,7 +915,7 @@ If all properties of [Text To Find][TextToFind Property] are `null` or empty (i. ### Null or empty property of Text To Find -If a property of [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), then that section of the query is not considered for a valid match and is not included as a specific [Group][] in the returned [Match][]; see [Find all occurrences that start with and end with a Text To Find in Text (Null contains)][]. +If a property of [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), then that section of the query is not considered for a valid match and is not included as a specific [Group][] in the returned [Match][]; see [Find all occurrences that start with and end with a Text To Find in Text (Null contains)][] and [Find all occurrences that start with a wildcard and end with a regex Text To Find in Text][]. ### Known Limitations @@ -928,6 +928,7 @@ If [Comparison Type][ComparisonType Property] is set to `StringComparison.Curren [ComparisonType Property]: {{< ref "#comparison-type" >}} [Find all occurrences that start with and end with a regex Text To Find in Text]: {{}} [Find all occurrences that start with and end with a Text To Find in Text (Null contains)]: {{}} +[Find all occurrences that start with a wildcard and end with a regex Text To Find in Text]: {{}} [Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} [InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md index b0b7381d3..35a69b1e0 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md @@ -689,7 +689,7 @@ If all properties of [Text To Find][TextToFind Property] are `null` or empty (i. ### Null or empty property of Text To Find -If a property of [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), then that section of the query is not considered for a valid match and is not included as a specific [Group][] in the returned [Match][]; see [Find the first Occurrence that starts with and ends with a Text To Find in Text (Null contains)][]. +If a property of [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), then that section of the query is not considered for a valid match and is not included as a specific [Group][] in the returned [Match][]; see [Find the first Occurrence that starts with and ends with a Text To Find in Text (Null contains)][] and [Find the first Occurrence that starts with a wildcard and ends with a regex Text To Find in Text][]. ### Known Limitations @@ -703,6 +703,7 @@ If [Search Options][SearchOptions Property] is set to `SearchOptions.Regex` or ` [ComparisonType Property]: {{< ref "#comparison-type" >}} [Find the first Occurrence that starts with and ends with a regex Text To Find in Text]: {{}} [Find the first Occurrence that starts with and ends with a Text To Find in Text (Null contains)]: {{}} +[Find the first Occurrence that starts with a wildcard and ends with a regex Text To Find in Text]: {{}} [Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} [InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} From f6cea550fec704bb16caa85f71dedb5cd0e681a7 Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Mon, 4 Dec 2023 12:10:47 +0000 Subject: [PATCH 10/22] fix ref --- .../2023.11/Reference/Blocks/Text/find-text/find-text-block.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md index 35a69b1e0..cb34a9ba8 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md @@ -703,7 +703,7 @@ If [Search Options][SearchOptions Property] is set to `SearchOptions.Regex` or ` [ComparisonType Property]: {{< ref "#comparison-type" >}} [Find the first Occurrence that starts with and ends with a regex Text To Find in Text]: {{}} [Find the first Occurrence that starts with and ends with a Text To Find in Text (Null contains)]: {{}} -[Find the first Occurrence that starts with a wildcard and ends with a regex Text To Find in Text]: {{}} +[Find the first Occurrence that starts with a wildcard and ends with a regex Text To Find in Text]: {{}} [Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} [InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} From c9e7e5f6ba405b2473af34f68de90377a68f51d2 Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Mon, 4 Dec 2023 12:17:34 +0000 Subject: [PATCH 11/22] fix typo --- .../2023.11/Reference/Blocks/Text/find-text/find-text-block.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md index cb34a9ba8..b2e7c0aa6 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md @@ -513,7 +513,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. #### Result -`"The quick brown fox jumps over the lazy dog."` has 4 occurrences starting with `"o"` and ending with the wildcard regex `".+?"`. The first of these is `"o"`. Therefore the variable `($)Match` will be set to the following: +`"The quick brown fox jumps over the lazy dog."` has 4 occurrences starting with `"o"` and ending with the wildcard regex `".+?"`. The first of these is `"ow"`. Therefore the variable `($)Match` will be set to the following: ```json { From e59f21ea419a3823f293cd9ce724ea40cf38cdf0 Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Mon, 4 Dec 2023 14:12:38 +0000 Subject: [PATCH 12/22] fix erroneous property values for examples --- .../Reference/Blocks/Text/find-text/find-all-text-block.md | 2 +- .../2023.11/Reference/Blocks/Text/find-text/find-text-block.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md index aaadd9c2a..12df2279a 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md @@ -392,7 +392,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| | [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog. The dog woke up and tried to bite the fox. The fox jumps to get away."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "The", "contains": null, "endsWith": "jumps"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "The", contains: null, endsWith:"jumps")` | `($)TextToFind` is a variable of type [TextToFind][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "The", "contains": "", "endsWith": "jumps"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "The", contains: null, endsWith:"jumps")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | | [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [List][]<[Match][]> value | diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md index b2e7c0aa6..a04ce163b 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md @@ -409,7 +409,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| | [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "The", "contains": null, "endsWith": "jumps"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "The", contains: null, endsWith:"jumps")` | `($)TextToFind` is a variable of type [TextToFind][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "The", "contains": "", "endsWith": "jumps"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "The", contains: null, endsWith:"jumps")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | From fb523a4d3a1c0399f8f6a42cb811120078ee6cb8 Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Mon, 4 Dec 2023 14:30:49 +0000 Subject: [PATCH 13/22] edit links, fix missing and incorrect notes in tables --- .../data-types/text/searchoptions.md | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md b/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md index b4f53b586..4ad1c82e2 100644 --- a/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md +++ b/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md @@ -45,7 +45,7 @@ Used to define how text searches determine whether text matches the search (i.e. |-|-| | **Name:** | Regex | | **Value:** | [Int32][] with value `1` | -| **Notes:** | Matches text that matches the [Regex][Regex Syntax] provided. | +| **Notes:** | Matches text that matches the [regex][Regex Syntax] provided. | ### PatternMatching @@ -53,7 +53,7 @@ Used to define how text searches determine whether text matches the search (i.e. |-|-| | **Name:** | PatternMatching | | **Value:** | [Int32][] with value `2` | -| **Notes:** | Matches text that matches the [Pattern Matching Syntax][] provided. | +| **Notes:** | Matches text that matches the [pattern][Pattern Matching Syntax] provided. | ## Remarks @@ -63,15 +63,15 @@ The following table shows some of the ways that `SearchOptions` can be created u | Method | Example | Result | Editor Support | Notes | |-|-|-|-|-| -| Declare a `SearchOptions` literal | `SearchOptions.ContainsText` | `SearchOptions.ContainsText` | Literal | Matches text exactly with a literal character search. | -| | `SearchOptions.Regex` | `SearchOptions.Regex` | Literal | Matches text that matches the regex provided. | -| | `SearchOptions.PatternMatching` | `SearchOptions.PatternMatching` | Literal | Matches text that matches the regex provided, see [Regex Syntax][]. | -| Use a `SearchOptions` expression | `SearchOptions.ContainsText` | `SearchOptions.ContainsText`| Expression | Empty entries are not removed.| -| | `SearchOptions.Regex` | `SearchOptions.Regex`| Expression | Empty entries are removed. | -| | `SearchOptions.PatternMatching` | `SearchOptions.PatternMatching`| Expression | Matches text that matches the regex provided, see [Regex Syntax][]. | -| Use [Explicit Casting][] | `(SearchOptions)0` | `SearchOptions.ContainsText`| Expression | Empty entries are not removed. | -| | `(SearchOptions)1` | `SearchOptions.Regex`| Expression | Empty entries are removed. | -| | `(SearchOptions)2` | `SearchOptions.PatternMatching`| Expression | Matches text that matches the regex provided, see [Regex Syntax][]. | +| Declare a `SearchOptions` literal | `SearchOptions.ContainsText` | `SearchOptions.ContainsText` | Literal | Matches text exactly with a literal character search, see [String Equality][]. | +| | `SearchOptions.Regex` | `SearchOptions.Regex` | Literal | Matches text that matches the regex provided, see [Regex Syntax][]. | +| | `SearchOptions.PatternMatching` | `SearchOptions.PatternMatching` | Literal | Matches text that matches the pattern provided, see [Pattern Matching Syntax][]. | +| Use a `SearchOptions` expression | `SearchOptions.ContainsText` | `SearchOptions.ContainsText`| Expression | Matches text exactly with a literal character search, see [String Equality][].| +| | `SearchOptions.Regex` | `SearchOptions.Regex`| Expression | Matches text that matches the regex provided, see [Regex Syntax][]. | +| | `SearchOptions.PatternMatching` | `SearchOptions.PatternMatching`| Expression | Matches text that matches the pattern provided, see [Pattern Matching Syntax][]. | +| Use [Explicit Casting][] | `(SearchOptions)0` | `SearchOptions.ContainsText`| Expression | Matches text exactly with a literal character search, see [String Equality][]. | +| | `(SearchOptions)1` | `SearchOptions.Regex`| Expression | Matches text that matches the regex provided, see [Regex Syntax][]. | +| | `(SearchOptions)2` | `SearchOptions.PatternMatching`| Expression | Matches text that matches the pattern provided, see [Pattern Matching Syntax][]. | | Use `Enum.Parse` | `(SearchOptions)Enum.Parse(typeof(SearchOptions), "ContainsText")` | `SearchOptions.ContainsText`| Expression | Parses `"ContainsText"` and converts it to `SearchOptions.ContainsText`. See [Enum.Parse][] | | | `(SearchOptions)Enum.Parse(typeof(SearchOptions), "Regex")` | `SearchOptions.Regex`| Expression | Parses `"Regex"` and converts it to `SearchOptions.Regex`. See [Enum.Parse][] | | | `(SearchOptions)Enum.Parse(typeof(SearchOptions), "PatternMatching")` | `SearchOptions.PatternMatching`| Expression | Parses `"PatternMatching"` and converts it to `SearchOptions.PatternMatching`. See [Enum.Parse][] | @@ -157,8 +157,9 @@ None [String]: {{< url path="Cortex.Reference.DataTypes.Text.String.MainDoc" >}} [Int32]: {{< url path="Cortex.Reference.DataTypes.Numbers.Int32.MainDoc" >}} -[Regex Syntax]: {{}} [Pattern Matching Syntax]: {{}} +[Regex Syntax]: {{}} +[String Equality]: {{}} [Instantiating an enumeration type]: {{< url path="MSDocs.DotNet.Api.System.Enum.InstantiatingAnEnum" >}} [Formatting enumeration values]: {{< url path="MSDocs.DotNet.Api.System.Enum.FormattingEnumerationValues" >}} From f658301b794a170a7d4d9ed7aab1ff37f717fae3 Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Mon, 4 Dec 2023 14:33:02 +0000 Subject: [PATCH 14/22] remove unneeded concepts link --- .../docs/2023.11/Reference/data-types/text/searchoptions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md b/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md index 4ad1c82e2..985a64e51 100644 --- a/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md +++ b/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md @@ -63,13 +63,13 @@ The following table shows some of the ways that `SearchOptions` can be created u | Method | Example | Result | Editor Support | Notes | |-|-|-|-|-| -| Declare a `SearchOptions` literal | `SearchOptions.ContainsText` | `SearchOptions.ContainsText` | Literal | Matches text exactly with a literal character search, see [String Equality][]. | +| Declare a `SearchOptions` literal | `SearchOptions.ContainsText` | `SearchOptions.ContainsText` | Literal | Matches text exactly with a literal character search. | | | `SearchOptions.Regex` | `SearchOptions.Regex` | Literal | Matches text that matches the regex provided, see [Regex Syntax][]. | | | `SearchOptions.PatternMatching` | `SearchOptions.PatternMatching` | Literal | Matches text that matches the pattern provided, see [Pattern Matching Syntax][]. | -| Use a `SearchOptions` expression | `SearchOptions.ContainsText` | `SearchOptions.ContainsText`| Expression | Matches text exactly with a literal character search, see [String Equality][].| +| Use a `SearchOptions` expression | `SearchOptions.ContainsText` | `SearchOptions.ContainsText`| Expression | Matches text exactly with a literal character search.| | | `SearchOptions.Regex` | `SearchOptions.Regex`| Expression | Matches text that matches the regex provided, see [Regex Syntax][]. | | | `SearchOptions.PatternMatching` | `SearchOptions.PatternMatching`| Expression | Matches text that matches the pattern provided, see [Pattern Matching Syntax][]. | -| Use [Explicit Casting][] | `(SearchOptions)0` | `SearchOptions.ContainsText`| Expression | Matches text exactly with a literal character search, see [String Equality][]. | +| Use [Explicit Casting][] | `(SearchOptions)0` | `SearchOptions.ContainsText`| Expression | Matches text exactly with a literal character search. | | | `(SearchOptions)1` | `SearchOptions.Regex`| Expression | Matches text that matches the regex provided, see [Regex Syntax][]. | | | `(SearchOptions)2` | `SearchOptions.PatternMatching`| Expression | Matches text that matches the pattern provided, see [Pattern Matching Syntax][]. | | Use `Enum.Parse` | `(SearchOptions)Enum.Parse(typeof(SearchOptions), "ContainsText")` | `SearchOptions.ContainsText`| Expression | Parses `"ContainsText"` and converts it to `SearchOptions.ContainsText`. See [Enum.Parse][] | From 34b2926513743640e1029c7259c94268c4877b8c Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Tue, 5 Dec 2023 14:52:15 +0000 Subject: [PATCH 15/22] signoff changes --- .../Reference/data-types/text/searchoptions.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md b/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md index 985a64e51..a2470ceb2 100644 --- a/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md +++ b/content/en/docs/2023.11/Reference/data-types/text/searchoptions.md @@ -1,7 +1,7 @@ --- title: "SearchOptions" linkTitle: "SearchOptions" -description: "Used to define how text searches determine whether text matches the search (i.e. text contains the searched for text or matches the specified regex or pattern)." +description: "Used to specify how text is matched when performing a search (i.e. text matches the specified literal text, regex or pattern)." --- # {{% param title %}} @@ -10,7 +10,7 @@ description: "Used to define how text searches determine whether text matches th ## Summary -Used to define how text searches determine whether text matches the search (i.e. text contains the searched for text or matches the specified regex or pattern). +The `SearchOptions` are used to specify how text is matched when performing a search (i.e. text matches the specified literal text, regex or pattern). `SearchOptions` is an [enum][Working with Enums] data type, which means it has a defined set of values, where each value has an associated [String][] name and [Int32][] value. @@ -20,7 +20,7 @@ Used to define how text searches determine whether text matches the search (i.e. | **Name:** | `SearchOptions` | | **Full Name:** | `Cortex.DataTypes.Text.SearchOptions` | | **Alias:** | N/A | -| **Description:** | Used to define how text searches determine whether text matches the search (i.e. text contains the searched for text or matches the specified regex or pattern). | +| **Description:** | Specifies how text is matched when performing a search (i.e. text matches the specified literal text, regex or pattern). | | **Default Value:** | `(SearchOptions)0` | | **Can be used as:** | `SearchOptions`, `Object`, `dynamic` | | **Can be cast to:** | `Int16` (e.g. `(Int16)SearchOptions.ContainsText` or `(System.Int16)SearchOptions.ContainsText` or `(short)SearchOptions.ContainsText`) | @@ -63,9 +63,9 @@ The following table shows some of the ways that `SearchOptions` can be created u | Method | Example | Result | Editor Support | Notes | |-|-|-|-|-| -| Declare a `SearchOptions` literal | `SearchOptions.ContainsText` | `SearchOptions.ContainsText` | Literal | Matches text exactly with a literal character search. | -| | `SearchOptions.Regex` | `SearchOptions.Regex` | Literal | Matches text that matches the regex provided, see [Regex Syntax][]. | -| | `SearchOptions.PatternMatching` | `SearchOptions.PatternMatching` | Literal | Matches text that matches the pattern provided, see [Pattern Matching Syntax][]. | +| Declare a `SearchOptions` literal | `ContainsText` | `SearchOptions.ContainsText` | Literal | Matches text exactly with a literal character search. | +| | `Regex` | `SearchOptions.Regex` | Literal | Matches text that matches the regex provided, see [Regex Syntax][]. | +| | `PatternMatching` | `SearchOptions.PatternMatching` | Literal | Matches text that matches the pattern provided, see [Pattern Matching Syntax][]. | | Use a `SearchOptions` expression | `SearchOptions.ContainsText` | `SearchOptions.ContainsText`| Expression | Matches text exactly with a literal character search.| | | `SearchOptions.Regex` | `SearchOptions.Regex`| Expression | Matches text that matches the regex provided, see [Regex Syntax][]. | | | `SearchOptions.PatternMatching` | `SearchOptions.PatternMatching`| Expression | Matches text that matches the pattern provided, see [Pattern Matching Syntax][]. | From 035a32297ccac84b97c9f8e9430b41bc517a6283 Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Tue, 5 Dec 2023 14:52:43 +0000 Subject: [PATCH 16/22] most signoff changes, still some TODO --- .../Blocks/Text/find-text/find-text-block.md | 473 +++++------------- 1 file changed, 117 insertions(+), 356 deletions(-) diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md index a04ce163b..139a8b3a0 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md @@ -17,7 +17,9 @@ Finds the specified [Occurrence][Occurrence Property] of [Text To Find][TextToFi ## Examples -### Find the first Occurrence of Text To Find (Ordinal) +**TODO EDIT THIS (FOR EXAMPLES OF HOW TO USE CONTAINSTEXT,ETC, PLEASE SEE)** + +### Find the first Occurrence of text This example will find the first occurrence of `"The"` in `"The quick brown fox jumps over the lazy dog."`. @@ -28,7 +30,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| | [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "The", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "The", endsWith: "")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | @@ -74,7 +76,7 @@ As this example is performing a [case-sensitive, culture-insensitive][Ordinal] c *** -### Find the second Occurrence of Text To Find (Ordinal Ignore Case) +### Find the second Occurrence of text This example will find the second occurrence of `"The"` in `"The quick brown fox jumps over the lazy dog."`. @@ -85,7 +87,7 @@ It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] compari | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| | [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "The", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "The", endsWith: "")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Occurrence][Occurrence Property] | `($)Occurrence`, with value `2` | `($)Occurrence` is a variable of type [Int32][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | @@ -131,7 +133,7 @@ As this example is performing a [case-insensitive, culture-insensitive][OrdinalI *** -### Find the last Occurrence of Text To Find +### Find the last Occurrence of text This example will find the last occurrence of `"The"` in `"The quick brown fox jumps over the lazy dog."`. @@ -142,7 +144,7 @@ It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] compari | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| | [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "The", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "The", endsWith: "")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Occurrence][Occurrence Property] | `($)Occurrence`, with value `-1` | `($)Occurrence` is a variable of type [Int32][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | @@ -188,7 +190,7 @@ As this example is performing a [case-insensitive, culture-insensitive][OrdinalI *** -### Find an invalid Occurrence of Text To Find +### Find an invalid Occurrence of text This example will find the third occurrence of `"The"`, which is not present, in `"The quick brown fox jumps over the lazy dog."`. @@ -199,7 +201,7 @@ It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] compari | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| | [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "The", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "The", endsWith: "")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Occurrence][Occurrence Property] | `($)Occurrence`, with value `3` | `($)Occurrence` is a variable of type [Int32][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | @@ -215,354 +217,6 @@ null *** -### Find the first Occurrence that matches the pattern in Text To Find - -This example will find the first occurrence of text that match a pattern containing `"?he"` in `"The quick brown fox jumps over the lazy dog."`. - -It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. - -#### Properties - -| Property | Value | Notes | -|--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "?he", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "?he", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | -| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | -| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.PatternMatching` | `($)SearchOptions` is a variable of type [SearchOptions][] | -| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | -| [Match][Match Property] | `($)Match`, with no value | `($)Match` is a variable that will be set to an [Match][] value | - -#### Result - -`"The quick brown fox jumps over the lazy dog."` contains `"The"` and `"the"` that matches the pattern `"?he"`. Of these, `"The"` is found first in the [Text][Text Property]. Therefore, the variable `($)Match` will be set to the following: - -```json -{ - "Value": "The", - "Index": 0, - "Length": 3, - "Groups": { - "0": { - "Value": "The", - "Index": 0, - "Length": 3, - "Captures": [ - { - "Value": "The", - "Index": 0, - "Length": 3 - } - ] - }, - "contains": { - "Value": "The", - "Index": 0, - "Length": 3, - "Captures": [ - { - "Value": "The", - "Index": 0, - "Length": 3 - } - ] - } - } -} -``` - -*** - -### Find the first Occurrence that matches the regex in Text To Find - -This example will find the first occurrence of text that match the regex `"^The"` from `"The quick brown fox jumps over the lazy dog."`. - -It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. - -#### Properties - -| Property | Value | Notes | -|--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "^The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "^The", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | -| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | -| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | -| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | -| [Match][Match Property] | `($)Match`, with no value | `($)Match` is a variable that will be set to an [Match][] value | - -#### Result - -`"The quick brown fox jumps over the lazy dog."` contains `"The"` at the start of the sentence that matches the regex `"^The"`. Therefore, the variable `($)Match` will be set to the following: - -```json -{ - "Value": "The", - "Index": 0, - "Length": 3, - "Groups": { - "0": { - "Value": "The", - "Index": 0, - "Length": 3, - "Captures": [ - { - "Value": "The", - "Index": 0, - "Length": 3 - } - ] - }, - "contains": { - "Value": "The", - "Index": 0, - "Length": 3, - "Captures": [ - { - "Value": "The", - "Index": 0, - "Length": 3 - } - ] - } - } -} -``` - -*** - -### Find the first Occurrence that starts with and ends with a regex Text To Find in Text - -This example will find the first occurrence of text that matches a regex that starts with `"The"`, contains `.*?` and ends with `"jumps"` from `"The quick brown fox jumps over the lazy dog."`. - -It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. - -#### Properties - -| Property | Value | Notes | -|--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "The", "contains": ".*?", "endsWith": "jumps"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "The", contains: ".*?", endsWith:"jumps")` | `($)TextToFind` is a variable of type [TextToFind][] | -| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | -| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | -| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | -| [Match][Match Property] | `($)Match`, with no value | `($)Match` is a variable that will be set to an [Match][] value | - -#### Result - -`"The quick brown fox jumps over the lazy dog."` contains one occurrence matching a regex starting with `"The"`, containing `.*?` which matches `" quick brown fox "`, and ending with `"jumps"`, which is `"The quick brown fox jumps"`. Therefore, the variable `($)Match` will be set to the following: - -```json -{ - "Value": "The quick brown fox jumps", - "Index": 0, - "Length": 25, - "Groups": { - "0": { - "Value": "The quick brown fox jumps", - "Index": 0, - "Length": 25, - "Captures": [ - { - "Value": "The quick brown fox jumps", - "Index": 0, - "Length": 25 - } - ] - }, - "startsWith": { - "Value": "The", - "Index": 0, - "Length": 3, - "Captures": [ - { - "Value": "The", - "Index": 0, - "Length": 3 - } - ] - }, - "endsWith": { - "Value": "jumps", - "Index": 20, - "Length": 5, - "Captures": [ - { - "Value": "jumps", - "Index": 20, - "Length": 5 - } - ] - } - } -} -``` - -*** - -### Find the first Occurrence that starts with and ends with a Text To Find in Text (Null contains) - -This example will find the first occurrence of text that starts with `"The"`, contains `null` and ends with `"jumps"` from `"The quick brown fox jumps over the lazy dog."`. To clarify, this [Text To Find][TextToFind Property] input is searching for matches of `"Thejumps"` exactly in [Text][Text Property]. - -It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. - -#### Properties - -| Property | Value | Notes | -|--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "The", "contains": "", "endsWith": "jumps"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "The", contains: null, endsWith:"jumps")` | `($)TextToFind` is a variable of type [TextToFind][] | -| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | -| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | -| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | -| [Match][Match Property] | `($)Match`, with no value | `($)Match` is a variable that will be set to an [Match][] value | - -#### Result - -`"The quick brown fox jumps over the lazy dog."` has 0 occurrences starting with `"The"` and ending with `"jumps"`, as [Contains][] being `null` will require an exact match for [Text to Find][TextToFind Property] in [Text][Text Property]. Therefore, the variable `($)Match` will be set to the following: - -```json -null -``` - -*** - -### Find the first Occurrence that starts with a wildcard and ends with a regex Text To Find in Text - -This example will find the first occurrence of text that matches a regex that starts with `".*?"` and ends with `"o"` in `"The quick brown fox jumps over the lazy dog."`. - -It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. - -#### Properties - -| Property | Value | Notes | -|--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": ".*?", "contains": "", "endsWith": "o"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: ".*?", contains: null, endsWith:"o")` | `($)TextToFind` is a variable of type [TextToFind][] | -| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | -| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | -| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | -| [Match][Match Property] | `($)Match`, with no value | `($)Match` is a variable that will be set to an [Match][] value | - -#### Result - -`"The quick brown fox jumps over the lazy dog."` has 4 occurrences ending with `"o"`, and starting with the wildcard regex `".*?"`. The first of these is `"The quick bro"`. Therefore, the variable `($)Match` will be set to the following: - -```json -{ - "Value": "The quick bro", - "Index": 0, - "Length": 13, - "Groups": { - "0": { - "Value": "The quick bro", - "Index": 0, - "Length": 13, - "Captures": [ - { - "Value": "The quick bro", - "Index": 0, - "Length": 13 - } - ] - }, - "startsWith": { - "Value": "", - "Index": 0, - "Length": 0, - "Captures": [ - { - "Value": "", - "Index": 0, - "Length": 0 - } - ] - }, - "endsWith": { - "Value": "o", - "Index": 12, - "Length": 1, - "Captures": [ - { - "Value": "o", - "Index": 12, - "Length": 1 - } - ] - } - } -} -``` - -*** - -### Find the first Occurrence that starts with a regex and ends with a wildcard Text To Find in Text - -This example will find the first occurrence of text that matches a regex that starts with `"o"` and ends with `".+?"`, `"The quick brown fox jumps over the lazy dog.`. - -It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. - -#### Properties - -| Property | Value | Notes | -|--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "o", "contains": "", "endsWith": ".+?"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "o", contains: null, endsWith:".+?")` | `($)TextToFind` is a variable of type [TextToFind][] | -| [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | -| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | -| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | -| [Match][Match Property] | `($)Match`, with no value | `($)Match` is a variable that will be set to an [Match][] value | - -#### Result - -`"The quick brown fox jumps over the lazy dog."` has 4 occurrences starting with `"o"` and ending with the wildcard regex `".+?"`. The first of these is `"ow"`. Therefore the variable `($)Match` will be set to the following: - -```json -{ - "Value": "ow", - "Index": 12, - "Length": 2, - "Groups": { - "0": { - "Value": "ow", - "Index": 12, - "Length": 2, - "Captures": [ - { - "Value": "ow", - "Index": 12, - "Length": 2 - } - ] - }, - "startsWith": { - "Value": "o", - "Index": 12, - "Length": 1, - "Captures": [ - { - "Value": "o", - "Index": 12, - "Length": 1 - } - ] - }, - "endsWith": { - "Value": "w", - "Index": 13, - "Length": 1, - "Captures": [ - { - "Value": "w", - "Index": 13, - "Length": 1 - } - ] - } - } -} -``` - -*** - ## Properties ### Text @@ -675,6 +329,113 @@ The exceptions thrown by the block can be found below: ## Remarks +### Advanced Examples + +The following sections will show examples for each of the [SearchOptions][]. + +In these examples, the following properties are common and will be configured as follows: +| Property | Value | +|----------|-------| +| [Text][Text Property] | `"The quick brown fox jumps over the lazy dog."` | +| [Occurrence][Occurrence Property] | `1` | +| [Comparison Type][ComparisonType Property] | `Ordinal` | +| [Match][] | `($)Match` with no value | + +The other properties are defined elsewhere in the sections below. + +These sections contain tables for the examples. The columns of these tables are explained below: +| Column Name | Explanation | +| TextToFind.StartsWith | Value used to define the StartsWith property of [Text To Find][TextToFind Property]. | +| TextToFind.Contains | Value used to define the Contains property of [Text To Find][TextToFind Property]. | +| TextToFind.EndsWith | Value used to define the EndsWith property of [Text To Find][TextToFind Property]. | +| Match.Value | Output [Match][] returned from the operation. This is `No Match` in the case of no valid match found. | +| Match.Groups["startsWith"].Value | The value of the "startsWith" Group within the output [Match][]. This is N/A in the case that this group is not returned in the output [Match][]. | +| Match.Groups["contains"].Value | The value of the "contains" Group within the output [Match][]. This is N/A in the case that this group is not returned in the output [Match][]. | +| Match.Groups["endsWith"].Value | The value of the "endsWith" Group within the output [Match][]. This is N/A in the case that this group is not returned in the output [Match][]. | + +#### SearchOptions.ContainsText + +These examples find the first occurrence in [Text][Text Property] with [Search Options][SearchOptions Property] set to `ContainsText` using a [case-sensitive, culture-insensitive][Ordinal] search. + +| TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Match.Value | Match.Groups["startsWith"].Value | Match.Groups["contains"].Value | Match.Groups["endsWith"].Value | +|------------|----------|----------|--------------|------------------|----------------|----------------| +| `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | +| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | +| `"The"` | `""` | `"brown"` | No Match | No Match | N/A | No Match | +| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | +| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | +| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | +| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | +| `""` | `""` | `""` | No Match | N/A | N/A | N/A | + +#### SearchOptions.PatternMatching + +These examples find the first occurrence in [Text][Text Property] with [Search Options][SearchOptions Property] set to `PatternMatching` using a [case-sensitive, culture-insensitive][Ordinal] search. + +| TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Result.Value | Result.Groups["startsWith"].Value | Result.Groups["contains"].Value | Result.Groups["endsWith"].Value | +|------------|----------|----------|--------------|------------------|----------------|----------------| +| `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | +| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | +| `"The"` | `""` | `"brown"` | No Match | No Match | N/A | No Match | +| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | +| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | +| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | +| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | +| `""` | `""` | `""` | No Match | N/A | N/A | N/A | +| `"The"` | `"quick"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `"The"` | `"*"` | `"brown"` | `"The quick brown"` | `"The"` | `" quick "` | `"brown"` | +| `"The"` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | `""` | +| `"The"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | N/A | +| `"The"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | N/A | `" quick brown fox jumps over the lazy dog."` | +| `"*"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The "` | `"quick"` | `"brown"` | +| `"*"` | `"quick"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The "` | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `"*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | N/A | +| `"*"` | `"*"` | `"brown"` | `"The quick brown"` | `"The quick "` | `""` | `"brown"` | +| `"*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | N/A | `"brown"` | +| `"*"` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | `""` | +| `"*"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | N/A | +| `"*"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | `""` | +| `"*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | +| `""` | `"quick"` | `"*"` | `"quick brown fox jumps over the lazy dog."` | N/A | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `""` | `"*"` | `"brown"` | `"The quick brown"` | N/A | `"The quick "` | `"brown"` | +| `""` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | `""` | +| `""` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | N/A | +| `""` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | `"The quick brown fox jumps over the lazy dog."` | + +#### SearchOptions.Regex + +These examples find the first occurrence in [Text][Text Property] with [Search Options][SearchOptions Property] set to `Regex` using a [case-sensitive, culture-insensitive][Ordinal] search. + +| TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Result.Value | Result.Groups["startsWith"].Value | Result.Groups["contains"].Value | Result.Groups["endsWith"].Value | +|------------|----------|----------|--------------|------------------|----------------|----------------| +| `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | +| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | +| `"The"` | `""` | `"brown"` | No Match | No Match | N/A | No Match | +| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | +| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | +| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | +| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | +| `""` | `""` | `""` | No Match | N/A | N/A | N/A | +| `"The"` | `"quick"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `"The"` | `".*"` | `"brown"` | `"The quick brown"` | `"The"` | `" quick "` | `"brown"` | +| `"The"` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | `""` | +| `"The"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | N/A | +| `"The"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | N/A | `" quick brown fox jumps over the lazy dog."` | +| `".*"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The "` | `"quick"` | `"brown"` | +| `".*"` | `"quick"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The "` | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `".*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | N/A | +| `".*"` | `".*"` | `"brown"` | `"The quick brown"` | `"The quick "` | `""` | `"brown"` | +| `".*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | N/A | `"brown"` | +| `".*"` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | `""` | +| `".*"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | N/A | +| `".*"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | `""` | +| `".*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | +| `""` | `"quick"` | `".*"` | `"quick brown fox jumps over the lazy dog."` | N/A | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `""` | `".*"` | `"brown"` | `"The quick brown"` | N/A | `"The quick "` | `"brown"` | +| `""` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | `""` | +| `""` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | N/A | +| `""` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | `"The quick brown fox jumps over the lazy dog."` | + ### Comparison Types For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. From be1be10eb01226d872de3f048513b7ddcada4da8 Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Tue, 5 Dec 2023 15:04:49 +0000 Subject: [PATCH 17/22] other signoff changes --- .../Blocks/Text/find-text/find-text-block.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md index 139a8b3a0..2f9b0be11 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md @@ -17,7 +17,7 @@ Finds the specified [Occurrence][Occurrence Property] of [Text To Find][TextToFi ## Examples -**TODO EDIT THIS (FOR EXAMPLES OF HOW TO USE CONTAINSTEXT,ETC, PLEASE SEE)** +The below are basic examples of how to use this block. For more detail of how to use [Search Options][SearchOptions Property] to use [Pattern Matching][Pattern Matching Syntax] or [Regex][Regex Syntax], or how [Text To Find][TextToFind Property] fields affect this blocks' behaviour, please see [Advanced Examples][]. ### Find the first Occurrence of text @@ -345,6 +345,7 @@ The other properties are defined elsewhere in the sections below. These sections contain tables for the examples. The columns of these tables are explained below: | Column Name | Explanation | +|-------------|-------------| | TextToFind.StartsWith | Value used to define the StartsWith property of [Text To Find][TextToFind Property]. | | TextToFind.Contains | Value used to define the Contains property of [Text To Find][TextToFind Property]. | | TextToFind.EndsWith | Value used to define the EndsWith property of [Text To Find][TextToFind Property]. | @@ -372,7 +373,7 @@ These examples find the first occurrence in [Text][Text Property] with [Search O These examples find the first occurrence in [Text][Text Property] with [Search Options][SearchOptions Property] set to `PatternMatching` using a [case-sensitive, culture-insensitive][Ordinal] search. -| TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Result.Value | Result.Groups["startsWith"].Value | Result.Groups["contains"].Value | Result.Groups["endsWith"].Value | +| TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Match.Value | Match.Groups["startsWith"].Value | Match.Groups["contains"].Value | Match.Groups["endsWith"].Value | |------------|----------|----------|--------------|------------------|----------------|----------------| | `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | | `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | @@ -406,7 +407,7 @@ These examples find the first occurrence in [Text][Text Property] with [Search O These examples find the first occurrence in [Text][Text Property] with [Search Options][SearchOptions Property] set to `Regex` using a [case-sensitive, culture-insensitive][Ordinal] search. -| TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Result.Value | Result.Groups["startsWith"].Value | Result.Groups["contains"].Value | Result.Groups["endsWith"].Value | +| TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Match.Value | Match.Groups["startsWith"].Value | Match.Groups["contains"].Value | Match.Groups["endsWith"].Value | |------------|----------|----------|--------------|------------------|----------------|----------------| | `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | | `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | @@ -450,12 +451,13 @@ If all properties of [Text To Find][TextToFind Property] are `null` or empty (i. ### Null or empty property of Text To Find -If a property of [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), then that section of the query is not considered for a valid match and is not included as a specific [Group][] in the returned [Match][]; see [Find the first Occurrence that starts with and ends with a Text To Find in Text (Null contains)][] and [Find the first Occurrence that starts with a wildcard and ends with a regex Text To Find in Text][]. +If a property of [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), then that section of the query is not considered for a valid match and is not included as a specific [Group][] in the returned [Match][]; see [Advanced Examples][]. ### Known Limitations -If [Search Options][SearchOptions Property] is set to `SearchOptions.Regex` or `SearchOptions.PatternMatching` and [Comparison Type][ComparisonType Property] is set to `StringComparison.CurrentCulture`, some characters such as `æ` that is equivalent to `ae` may not evaluate as equal. +If [Comparison Type][ComparisonType Property] is set to `StringComparison.CurrentCulture`, some characters such as `æ` that is equivalent to `ae` may not evaluate as equal. +[Advanced Examples]: {{}} [Match Property]: {{< ref "#match" >}} [Occurrence Property]:{{}} [Text Property]: {{< ref "#text" >}} From 439dd299b5aa094b9ab1df6fb938b328dabf623c Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Tue, 5 Dec 2023 15:05:49 +0000 Subject: [PATCH 18/22] remove nonexistent refs --- .../2023.11/Reference/Blocks/Text/find-text/find-text-block.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md index 2f9b0be11..b9a49b71d 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md @@ -464,9 +464,6 @@ If [Comparison Type][ComparisonType Property] is set to `StringComparison.Curren [TextToFind Property]: {{< ref "#text-to-find" >}} [SearchOptions Property]: {{< ref "#search-options" >}} [ComparisonType Property]: {{< ref "#comparison-type" >}} -[Find the first Occurrence that starts with and ends with a regex Text To Find in Text]: {{}} -[Find the first Occurrence that starts with and ends with a Text To Find in Text (Null contains)]: {{}} -[Find the first Occurrence that starts with a wildcard and ends with a regex Text To Find in Text]: {{}} [Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} [InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} From 216ea86b97a349c9e12cc9f6e59b7afaf52ba74f Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Tue, 5 Dec 2023 16:21:40 +0000 Subject: [PATCH 19/22] rewrite docs to more closely match FindText block --- .../Text/find-text/find-all-text-block.md | 756 +++--------------- 1 file changed, 125 insertions(+), 631 deletions(-) diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md index 12df2279a..65324509c 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md @@ -17,65 +17,9 @@ Finds all occurrences of [Text To Find][TextToFind Property] in a given [Text][T ## Examples -### Find all occurrences of Text To Find (Ordinal) +The below are basic examples of how to use this block. For more detail of how to use [Search Options][SearchOptions Property] to use [Pattern Matching][Pattern Matching Syntax] or [Regex][Regex Syntax], or how [Text To Find][TextToFind Property] fields affect this blocks' behaviour, please see [Advanced Examples][]. -This example will find all occurrences of `"The"` in `"The quick brown fox jumps over the lazy dog."`. - -It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. - -#### Properties - -| Property | Value | Notes | -|--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "The", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | -| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | -| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | -| [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [List][]<[Match][]> value | - -#### Result - -As this example is performing a [case-sensitive, culture-insensitive][Ordinal] comparison of text, `"The quick brown fox jumps over the lazy dog."` only contains the text `"The"` once; `"the"` has a different case so does not match. Therefore, the variable `($)Matches` will be set to the following: - -```json -[ - { - "Value": "The", - "Index": 0, - "Length": 3, - "Groups": { - "0": { - "Value": "The", - "Index": 0, - "Length": 3, - "Captures": [ - { - "Value": "The", - "Index": 0, - "Length": 3 - } - ] - }, - "contains": { - "Value": "The", - "Index": 0, - "Length": 3, - "Captures": [ - { - "Value": "The", - "Index": 0, - "Length": 3 - } - ] - } - } - } -] -``` - -*** - -### Find all occurrences of Text To Find (Ordinal Ignore Case) +### Find all occurrences of text This example will find all occurrences of `"The"` in `"The quick brown fox jumps over the lazy dog."`. @@ -86,103 +30,14 @@ It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] compari | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| | [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "The", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "o", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "o", endsWith: "")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | -| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | -| [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [List][]<[Match][]> value | - -#### Result - -As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog."` contains the text `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. Therefore, the variable `($)Matches` will be updated to the following: - -```json -[ - { - "Value": "The", - "Index": 0, - "Length": 3, - "Groups": { - "0": { - "Value": "The", - "Index": 0, - "Length": 3, - "Captures": [ - { - "Value": "The", - "Index": 0, - "Length": 3 - } - ] - }, - "contains": { - "Value": "The", - "Index": 0, - "Length": 3, - "Captures": [ - { - "Value": "The", - "Index": 0, - "Length": 3 - } - ] - } - } - }, - { - "Value": "the", - "Index": 31, - "Length": 3, - "Groups": { - "0": { - "Value": "the", - "Index": 31, - "Length": 3, - "Captures": [ - { - "Value": "the", - "Index": 31, - "Length": 3 - } - ] - }, - "contains": { - "Value": "the", - "Index": 31, - "Length": 3, - "Captures": [ - { - "Value": "the", - "Index": 31, - "Length": 3 - } - ] - } - } - } -] -``` - -*** - -### Find all occurrences that match the pattern in Text To Find - -This example will find all occurrences of text that match a pattern containing `"?he"` in `"The quick brown fox jumps over the lazy dog."`. - -It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. - -#### Properties - -| Property | Value | Notes | -|--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "?he", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "?he", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | -| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.PatternMatching` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | | [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [List][]<[Match][]> value | #### Result -`"The quick brown fox jumps over the lazy dog."` contains `"The"` and `"the"` that matches the pattern `"?he"`. Therefore, the variable `($)Matches` will be set to the following: +As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog."` contains the text `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. Therefore, the variable `($)Matches` will be updated to the following: ```json [ @@ -251,11 +106,9 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. ] ``` -*** - -### Find all occurrences that match the regex in Text To Find +### Find all occurrences of text (1 valid match) -This example will find all occurrences of text that match the regex `"^The"` from `"The quick brown fox jumps over the lazy dog."`. +This example will find all occurrences of `"The"` in `"The quick brown fox jumps over the lazy dog."`. It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. @@ -264,14 +117,14 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| | [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "^The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "^The", endsWith:"")` | `($)TextToFind` is a variable of type [TextToFind][] | -| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "The", endsWith: "")` | `($)TextToFind` is a variable of type [TextToFind][] | +| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | | [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [List][]<[Match][]> value | #### Result -`"The quick brown fox jumps over the lazy dog."` contains `"The"` at the start of the sentence that matches the regex `"^The"`. Therefore, the variable `($)Matches` will be set to the following: +As this example is performing a [case-sensitive, culture-insensitive][Ordinal] comparison of text, `"The quick brown fox jumps over the lazy dog."` only contains the text `"The"` once; `"the"` has a different case so does not match. Therefore, the variable `($)Matches` will be set to the following: ```json [ @@ -311,9 +164,9 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. *** -### Find all occurrences that start with and end with a regex Text To Find in Text +### Find all occurrences of text (0 valid matches) -This example will find all occurrences of text that matches a regex that starts with `"The"`, contains `.*?` and ends with `"jumps"` from `"The quick brown fox jumps over the lazy dog."`. +This example will find all occurrences of `"banana"` in `"The quick brown fox jumps over the lazy dog."`. It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. @@ -322,84 +175,14 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| | [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "The", "contains": ".*?", "endsWith": "jumps"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "The", contains: ".*?", endsWith:"jumps")` | `($)TextToFind` is a variable of type [TextToFind][] | -| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | -| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | -| [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [List][]<[Match][]> value | - -#### Result - -`"The quick brown fox jumps over the lazy dog."` contains 1 occurrence starting with `"The"` and ending with `"jumps"`, which is `"The quick brown fox jumps"` Therefore, the variable `($)Matches` will be set to the following: - -```json -[ - { - "Value": "The quick brown fox jumps", - "Index": 0, - "Length": 25, - "Groups": { - "0": { - "Value": "The quick brown fox jumps", - "Index": 0, - "Length": 25, - "Captures": [ - { - "Value": "The quick brown fox jumps", - "Index": 0, - "Length": 25 - } - ] - }, - "startsWith": { - "Value": "The", - "Index": 0, - "Length": 3, - "Captures": [ - { - "Value": "The", - "Index": 0, - "Length": 3 - } - ] - }, - "endsWith": { - "Value": "jumps", - "Index": 20, - "Length": 5, - "Captures": [ - { - "Value": "jumps", - "Index": 20, - "Length": 5 - } - ] - } - } - } -] -``` - -*** - -### Find all occurrences that start with and end with a Text To Find in Text (Null contains) - -This example will find all occurrences of text that start with `"The"`, contains `null` and ends with `"jumps"` from `"The quick brown fox jumps over the lazy dog. The dog woke up and tried to bite the fox. The fox jumps to get away."`. To clarify, this [Text To Find][TextToFind Property] input is searching for matches of `"Thejumps"` exactly in [Text][Text Property]. - -It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. - -#### Properties - -| Property | Value | Notes | -|--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog. The dog woke up and tried to bite the fox. The fox jumps to get away."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "The", "contains": "", "endsWith": "jumps"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "The", contains: null, endsWith:"jumps")` | `($)TextToFind` is a variable of type [TextToFind][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "banana", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "banana", endsWith: "")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | | [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [List][]<[Match][]> value | -#### Result +#### Results -`"The quick brown fox jumps over the lazy dog. The dog woke up and tried to bite the fox. The fox jumps to get away."` has 0 occurrences starting with `"The"` and ending with `"jumps"`, as [Contains][] being `null` will require an exact match for [Text to Find][TextToFind Property] in [Text][Text Property]. Therefore, the variable `($)Matches` will be set to the following: +`"The quick brown fox jumps over the lazy dog."` does not contain an occurrence of `"banana"`. Therefore, `($)Matches` will be set to the following: ```json [] @@ -407,402 +190,6 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. *** -### Find all occurrences that start with a wildcard and end with a regex Text To Find in Text - -This example will find all occurrences of text that start with a wildcard regex `".*?"` and end with `"o"` from `"The quick brown fox jumps over the lazy dog."`. - -It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. - -#### Properties - -| Property | Value | Notes | -|--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": ".*?", "contains": "", "endsWith": "o"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: ".*?", contains: null, endsWith:"o")` | `($)TextToFind` is a variable of type [TextToFind][] | -| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | -| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | -| [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [List][]<[Match][]> value | - -#### Result - -`"The quick brown fox jumps over the lazy dog."` has 4 occurrences starting with the wildcard regex `".*?"` and ending with `"o"`. Therefore the variable `($)Matches` will be set to the following: - -```json -[ - { - "Value": "The quick bro", - "Index": 0, - "Length": 13, - "Groups": { - "0": { - "Value": "The quick bro", - "Index": 0, - "Length": 13, - "Captures": [ - { - "Value": "The quick bro", - "Index": 0, - "Length": 13 - } - ] - }, - "startsWith": { - "Value": "The quick br", - "Index": 0, - "Length": 12, - "Captures": [ - { - "Value": "The quick br", - "Index": 0, - "Length": 12 - } - ] - }, - "endsWith": { - "Value": "o", - "Index": 12, - "Length": 1, - "Captures": [ - { - "Value": "o", - "Index": 12, - "Length": 1 - } - ] - } - } - }, - { - "Value": "wn fo", - "Index": 13, - "Length": 5, - "Groups": { - "0": { - "Value": "wn fo", - "Index": 13, - "Length": 5, - "Captures": [ - { - "Value": "wn fo", - "Index": 13, - "Length": 5 - } - ] - }, - "startsWith": { - "Value": "wn f", - "Index": 13, - "Length": 4, - "Captures": [ - { - "Value": "wn f", - "Index": 13, - "Length": 4 - } - ] - }, - "endsWith": { - "Value": "o", - "Index": 17, - "Length": 1, - "Captures": [ - { - "Value": "o", - "Index": 17, - "Length": 1 - } - ] - } - } - }, - { - "Value": "x jumps o", - "Index": 18, - "Length": 9, - "Groups": { - "0": { - "Value": "x jumps o", - "Index": 18, - "Length": 9, - "Captures": [ - { - "Value": "x jumps o", - "Index": 18, - "Length": 9 - } - ] - }, - "startsWith": { - "Value": "x jumps ", - "Index": 18, - "Length": 8, - "Captures": [ - { - "Value": "x jumps ", - "Index": 18, - "Length": 8 - } - ] - }, - "endsWith": { - "Value": "o", - "Index": 26, - "Length": 1, - "Captures": [ - { - "Value": "o", - "Index": 26, - "Length": 1 - } - ] - } - } - }, - { - "Value": "ver the lazy do", - "Index": 27, - "Length": 15, - "Groups": { - "0": { - "Value": "ver the lazy do", - "Index": 27, - "Length": 15, - "Captures": [ - { - "Value": "ver the lazy do", - "Index": 27, - "Length": 15 - } - ] - }, - "startsWith": { - "Value": "ver the lazy d", - "Index": 27, - "Length": 14, - "Captures": [ - { - "Value": "ver the lazy d", - "Index": 27, - "Length": 14 - } - ] - }, - "endsWith": { - "Value": "o", - "Index": 41, - "Length": 1, - "Captures": [ - { - "Value": "o", - "Index": 41, - "Length": 1 - } - ] - } - } - } -] -``` - -*** - -### Find all occurrences that start with a regex and end with a wildcard Text to Find in Text - -This example will find all occurrences of text that start with `"o"` and end with a wildcard regex `".+?"` from `"The quick brown fox jumps over the lazy dog."`. - -It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. - -#### Properties - -| Property | Value | Notes | -|--------------------|---------------------------|------------------------------------------| -| [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "o", "contains": "", "endsWith": ".+?"}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "o", contains: null, endsWith:".+?")` | `($)TextToFind` is a variable of type [TextToFind][] | -| [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.Regex` | `($)SearchOptions` is a variable of type [SearchOptions][] | -| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | -| [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [List][]<[Match][]> value | - -#### Result - -`"The quick brown fox jumps over the lazy dog."` has 4 occurrences starting with `"o"` and ending with `".+?"`. Therefore the variable `($)Matches` will be set to the following: - -```json -[ - { - "Value": "ow", - "Index": 12, - "Length": 2, - "Groups": { - "0": { - "Value": "ow", - "Index": 12, - "Length": 2, - "Captures": [ - { - "Value": "ow", - "Index": 12, - "Length": 2 - } - ] - }, - "startsWith": { - "Value": "o", - "Index": 12, - "Length": 1, - "Captures": [ - { - "Value": "o", - "Index": 12, - "Length": 1 - } - ] - }, - "endsWith": { - "Value": "w", - "Index": 13, - "Length": 1, - "Captures": [ - { - "Value": "w", - "Index": 13, - "Length": 1 - } - ] - } - } - }, - { - "Value": "ox", - "Index": 17, - "Length": 2, - "Groups": { - "0": { - "Value": "ox", - "Index": 17, - "Length": 2, - "Captures": [ - { - "Value": "ox", - "Index": 17, - "Length": 2 - } - ] - }, - "startsWith": { - "Value": "o", - "Index": 17, - "Length": 1, - "Captures": [ - { - "Value": "o", - "Index": 17, - "Length": 1 - } - ] - }, - "endsWith": { - "Value": "x", - "Index": 18, - "Length": 1, - "Captures": [ - { - "Value": "x", - "Index": 18, - "Length": 1 - } - ] - } - } - }, - { - "Value": "ov", - "Index": 26, - "Length": 2, - "Groups": { - "0": { - "Value": "ov", - "Index": 26, - "Length": 2, - "Captures": [ - { - "Value": "ov", - "Index": 26, - "Length": 2 - } - ] - }, - "startsWith": { - "Value": "o", - "Index": 26, - "Length": 1, - "Captures": [ - { - "Value": "o", - "Index": 26, - "Length": 1 - } - ] - }, - "endsWith": { - "Value": "v", - "Index": 27, - "Length": 1, - "Captures": [ - { - "Value": "v", - "Index": 27, - "Length": 1 - } - ] - } - } - }, - { - "Value": "og", - "Index": 41, - "Length": 2, - "Groups": { - "0": { - "Value": "og", - "Index": 41, - "Length": 2, - "Captures": [ - { - "Value": "og", - "Index": 41, - "Length": 2 - } - ] - }, - "startsWith": { - "Value": "o", - "Index": 41, - "Length": 1, - "Captures": [ - { - "Value": "o", - "Index": 41, - "Length": 1 - } - ] - }, - "endsWith": { - "Value": "g", - "Index": 42, - "Length": 1, - "Captures": [ - { - "Value": "g", - "Index": 42, - "Length": 1 - } - ] - } - } - } -] -``` - ## Properties ### Text @@ -901,6 +288,115 @@ The exceptions thrown by the block can be found below: ## Remarks +### Advanced Examples + +The following sections will show examples for each of the [SearchOptions][]. + +In these examples, the following properties are common and will be configured as follows: +| Property | Value | +|----------|-------| +| [Text][Text Property] | `"The quick brown fox jumps over the lazy dog."` | +| [Comparison Type][ComparisonType Property] | `Ordinal` | +| [Matches][Matches Property] | `($)Matches` with no value | + +The other properties are defined elsewhere in the sections below. + +These sections contain tables for the examples. The columns of these tables are explained below: +| Column Name | Explanation | +|-------------|-------------| +| TextToFind.StartsWith | Value used to define the StartsWith property of [Text To Find][TextToFind Property]. | +| TextToFind.Contains | Value used to define the Contains property of [Text To Find][TextToFind Property]. | +| TextToFind.EndsWith | Value used to define the EndsWith property of [Text To Find][TextToFind Property]. | +| Matches[0].Value | Output [Matches][Matches Property] returned from the operation. This is `No Match` in the case of no valid match found. | +| Matches[0].Groups["startsWith"].Value | The value of the "startsWith" Group within the first match in the output [Matches][Matches Property]. This is N/A in the case that this group is not returned for this match. This is `No Match` in the case of no valid match existing. | +| Matches[0].Groups["contains"].Value | The value of the "contains" Group within the first match in the output [Matches][Matches Property]. This is N/A in the case that this group is not returned for this match. This is `No Match` in the case of no valid match existing. | +| Matches[0].Groups["endsWith"].Value | The value of the "endsWith" Group within the first match in the output [Matches][Matches Property]. This is N/A in the case that this group is not returned for this match. This is `No Match` in the case of no valid match existing. | + +Please note that these examples all perform a search which has at most 1 valid match in the text. + +#### SearchOptions.ContainsText + +These examples find the first occurrence in [Text][Text Property] with [Search Options][SearchOptions Property] set to `ContainsText` using a [case-sensitive, culture-insensitive][Ordinal] search. + +| TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Matches.Value | Matches.Groups["startsWith"].Value | Matches.Groups["contains"].Value | Matches.Groups["endsWith"].Value | +|------------|----------|----------|--------------|------------------|----------------|----------------| +| `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | +| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | +| `"The"` | `""` | `"brown"` | No Match | No Match | N/A | No Match | +| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | +| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | +| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | +| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | +| `""` | `""` | `""` | No Match | N/A | N/A | N/A | + +#### SearchOptions.PatternMatching + +These examples find the first occurrence in [Text][Text Property] with [Search Options][SearchOptions Property] set to `PatternMatching` using a [case-sensitive, culture-insensitive][Ordinal] search. + +| TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Matches.Value | Matches.Groups["startsWith"].Value | Matches.Groups["contains"].Value | Matches.Groups["endsWith"].Value | +|------------|----------|----------|--------------|------------------|----------------|----------------| +| `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | +| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | +| `"The"` | `""` | `"brown"` | No Match | No Match | N/A | No Match | +| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | +| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | +| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | +| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | +| `""` | `""` | `""` | No Match | N/A | N/A | N/A | +| `"The"` | `"quick"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `"The"` | `"*"` | `"brown"` | `"The quick brown"` | `"The"` | `" quick "` | `"brown"` | +| `"The"` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | `""` | +| `"The"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | N/A | +| `"The"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | N/A | `" quick brown fox jumps over the lazy dog."` | +| `"*"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The "` | `"quick"` | `"brown"` | +| `"*"` | `"quick"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The "` | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `"*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | N/A | +| `"*"` | `"*"` | `"brown"` | `"The quick brown"` | `"The quick "` | `""` | `"brown"` | +| `"*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | N/A | `"brown"` | +| `"*"` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | `""` | +| `"*"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | N/A | +| `"*"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | `""` | +| `"*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | +| `""` | `"quick"` | `"*"` | `"quick brown fox jumps over the lazy dog."` | N/A | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `""` | `"*"` | `"brown"` | `"The quick brown"` | N/A | `"The quick "` | `"brown"` | +| `""` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | `""` | +| `""` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | N/A | +| `""` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | `"The quick brown fox jumps over the lazy dog."` | + +#### SearchOptions.Regex + +These examples find the first occurrence in [Text][Text Property] with [Search Options][SearchOptions Property] set to `Regex` using a [case-sensitive, culture-insensitive][Ordinal] search. + +| TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Matches.Value | Matches.Groups["startsWith"].Value | Matches.Groups["contains"].Value | Matches.Groups["endsWith"].Value | +|------------|----------|----------|--------------|------------------|----------------|----------------| +| `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | +| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | +| `"The"` | `""` | `"brown"` | No Match | No Match | N/A | No Match | +| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | +| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | +| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | +| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | +| `""` | `""` | `""` | No Match | N/A | N/A | N/A | +| `"The"` | `"quick"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `"The"` | `".*"` | `"brown"` | `"The quick brown"` | `"The"` | `" quick "` | `"brown"` | +| `"The"` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | `""` | +| `"The"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | N/A | +| `"The"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | N/A | `" quick brown fox jumps over the lazy dog."` | +| `".*"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The "` | `"quick"` | `"brown"` | +| `".*"` | `"quick"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The "` | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `".*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | N/A | +| `".*"` | `".*"` | `"brown"` | `"The quick brown"` | `"The quick "` | `""` | `"brown"` | +| `".*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | N/A | `"brown"` | +| `".*"` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | `""` | +| `".*"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | N/A | +| `".*"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | `""` | +| `".*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | +| `""` | `"quick"` | `".*"` | `"quick brown fox jumps over the lazy dog."` | N/A | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `""` | `".*"` | `"brown"` | `"The quick brown"` | N/A | `"The quick "` | `"brown"` | +| `""` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | `""` | +| `""` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | N/A | +| `""` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | `"The quick brown fox jumps over the lazy dog."` | + ### Comparison Types For information about the [supported values][ComparisonTypes] for the [Comparison Type][ComparisonType Property] property and examples of how it is determined whether two pieces of text match, please see [Equality][]. @@ -915,20 +411,18 @@ If all properties of [Text To Find][TextToFind Property] are `null` or empty (i. ### Null or empty property of Text To Find -If a property of [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), then that section of the query is not considered for a valid match and is not included as a specific [Group][] in the returned [Match][]; see [Find all occurrences that start with and end with a Text To Find in Text (Null contains)][] and [Find all occurrences that start with a wildcard and end with a regex Text To Find in Text][]. +If a property of [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), then that section of the query is not considered for a valid match and is not included as a specific [Group][] in the returned [Match][]; see [Advanced Examples][]. ### Known Limitations If [Comparison Type][ComparisonType Property] is set to `StringComparison.CurrentCulture`, some characters such as `æ` that are equivalent to `ae` may not evaluate as equal. +[Advanced Examples]: {{}} [Matches Property]: {{< ref "#matches" >}} [Text Property]: {{< ref "#text" >}} [TextToFind Property]: {{< ref "#text-to-find" >}} [SearchOptions Property]: {{< ref "#search-options" >}} [ComparisonType Property]: {{< ref "#comparison-type" >}} -[Find all occurrences that start with and end with a regex Text To Find in Text]: {{}} -[Find all occurrences that start with and end with a Text To Find in Text (Null contains)]: {{}} -[Find all occurrences that start with a wildcard and end with a regex Text To Find in Text]: {{}} [Input]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.Input" >}} [InputOutput]: {{< url path="Cortex.Reference.Concepts.Fundamentals.Blocks.BlockProperties.WhatIsABlockProperty.InputOutput" >}} From 86c9c2d16d6af0d4c04bf37293fc70c3e73d6e40 Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Tue, 5 Dec 2023 16:46:13 +0000 Subject: [PATCH 20/22] nobreaks in table to prevent wrapping --- .../Text/find-text/find-all-text-block.md | 112 +++++++++--------- .../Blocks/Text/find-text/find-text-block.md | 112 +++++++++--------- 2 files changed, 112 insertions(+), 112 deletions(-) diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md index 65324509c..e5b44fd1b 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md @@ -320,13 +320,13 @@ These examples find the first occurrence in [Text][Text Property] with [Search O | TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Matches.Value | Matches.Groups["startsWith"].Value | Matches.Groups["contains"].Value | Matches.Groups["endsWith"].Value | |------------|----------|----------|--------------|------------------|----------------|----------------| -| `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | -| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | +| `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | +| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | | `"The"` | `""` | `"brown"` | No Match | No Match | N/A | No Match | -| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | -| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | -| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | -| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | +| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | +| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | +| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | +| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | | `""` | `""` | `""` | No Match | N/A | N/A | N/A | #### SearchOptions.PatternMatching @@ -335,33 +335,33 @@ These examples find the first occurrence in [Text][Text Property] with [Search O | TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Matches.Value | Matches.Groups["startsWith"].Value | Matches.Groups["contains"].Value | Matches.Groups["endsWith"].Value | |------------|----------|----------|--------------|------------------|----------------|----------------| -| `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | -| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | +| `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | +| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | | `"The"` | `""` | `"brown"` | No Match | No Match | N/A | No Match | -| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | -| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | -| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | -| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | +| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | +| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | +| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | +| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | | `""` | `""` | `""` | No Match | N/A | N/A | N/A | -| `"The"` | `"quick"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `"The"` | `"*"` | `"brown"` | `"The quick brown"` | `"The"` | `" quick "` | `"brown"` | -| `"The"` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | `""` | -| `"The"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | N/A | -| `"The"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | N/A | `" quick brown fox jumps over the lazy dog."` | -| `"*"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The "` | `"quick"` | `"brown"` | -| `"*"` | `"quick"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The "` | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `"*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | N/A | -| `"*"` | `"*"` | `"brown"` | `"The quick brown"` | `"The quick "` | `""` | `"brown"` | -| `"*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | N/A | `"brown"` | -| `"*"` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | `""` | -| `"*"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | N/A | -| `"*"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | `""` | -| `"*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | -| `""` | `"quick"` | `"*"` | `"quick brown fox jumps over the lazy dog."` | N/A | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `""` | `"*"` | `"brown"` | `"The quick brown"` | N/A | `"The quick "` | `"brown"` | -| `""` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | `""` | -| `""` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | N/A | -| `""` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | `"The quick brown fox jumps over the lazy dog."` | +| `"The"` | `"quick"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `"The"` | `"*"` | `"brown"` | `"The quick brown"` | `"The"` | `" quick "` | `"brown"` | +| `"The"` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | `""` | +| `"The"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | N/A | +| `"The"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | N/A | `" quick brown fox jumps over the lazy dog."` | +| `"*"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The "` | `"quick"` | `"brown"` | +| `"*"` | `"quick"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The "` | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `"*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | N/A | +| `"*"` | `"*"` | `"brown"` | `"The quick brown"` | `"The quick "` | `""` | `"brown"` | +| `"*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | N/A | `"brown"` | +| `"*"` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | `""` | +| `"*"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | N/A | +| `"*"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | `""` | +| `"*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | +| `""` | `"quick"` | `"*"` | `"quick brown fox jumps over the lazy dog."` | N/A | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `""` | `"*"` | `"brown"` | `"The quick brown"` | N/A | `"The quick "` | `"brown"` | +| `""` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | `""` | +| `""` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | N/A | +| `""` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | `"The quick brown fox jumps over the lazy dog."` | #### SearchOptions.Regex @@ -369,33 +369,33 @@ These examples find the first occurrence in [Text][Text Property] with [Search O | TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Matches.Value | Matches.Groups["startsWith"].Value | Matches.Groups["contains"].Value | Matches.Groups["endsWith"].Value | |------------|----------|----------|--------------|------------------|----------------|----------------| -| `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | -| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | +| `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | +| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | | `"The"` | `""` | `"brown"` | No Match | No Match | N/A | No Match | -| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | -| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | -| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | -| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | +| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | +| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | +| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | +| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | | `""` | `""` | `""` | No Match | N/A | N/A | N/A | -| `"The"` | `"quick"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `"The"` | `".*"` | `"brown"` | `"The quick brown"` | `"The"` | `" quick "` | `"brown"` | -| `"The"` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | `""` | -| `"The"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | N/A | -| `"The"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | N/A | `" quick brown fox jumps over the lazy dog."` | -| `".*"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The "` | `"quick"` | `"brown"` | -| `".*"` | `"quick"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The "` | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `".*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | N/A | -| `".*"` | `".*"` | `"brown"` | `"The quick brown"` | `"The quick "` | `""` | `"brown"` | -| `".*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | N/A | `"brown"` | -| `".*"` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | `""` | -| `".*"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | N/A | -| `".*"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | `""` | -| `".*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | -| `""` | `"quick"` | `".*"` | `"quick brown fox jumps over the lazy dog."` | N/A | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `""` | `".*"` | `"brown"` | `"The quick brown"` | N/A | `"The quick "` | `"brown"` | -| `""` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | `""` | -| `""` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | N/A | -| `""` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | `"The quick brown fox jumps over the lazy dog."` | +| `"The"` | `"quick"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `"The"` | `".*"` | `"brown"` | `"The quick brown"` | `"The"` | `" quick "` | `"brown"` | +| `"The"` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | `""` | +| `"The"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | N/A | +| `"The"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | N/A | `" quick brown fox jumps over the lazy dog."` | +| `".*"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The "` | `"quick"` | `"brown"` | +| `".*"` | `"quick"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The "` | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `".*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | N/A | +| `".*"` | `".*"` | `"brown"` | `"The quick brown"` | `"The quick "` | `""` | `"brown"` | +| `".*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | N/A | `"brown"` | +| `".*"` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | `""` | +| `".*"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | N/A | +| `".*"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | `""` | +| `".*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | +| `""` | `"quick"` | `".*"` | `"quick brown fox jumps over the lazy dog."` | N/A | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `""` | `".*"` | `"brown"` | `"The quick brown"` | N/A | `"The quick "` | `"brown"` | +| `""` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | `""` | +| `""` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | N/A | +| `""` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | `"The quick brown fox jumps over the lazy dog."` | ### Comparison Types diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md index b9a49b71d..5d1050b8e 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md @@ -360,13 +360,13 @@ These examples find the first occurrence in [Text][Text Property] with [Search O | TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Match.Value | Match.Groups["startsWith"].Value | Match.Groups["contains"].Value | Match.Groups["endsWith"].Value | |------------|----------|----------|--------------|------------------|----------------|----------------| -| `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | -| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | +| `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | +| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | | `"The"` | `""` | `"brown"` | No Match | No Match | N/A | No Match | -| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | -| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | -| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | -| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | +| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | +| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | +| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | +| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | | `""` | `""` | `""` | No Match | N/A | N/A | N/A | #### SearchOptions.PatternMatching @@ -375,33 +375,33 @@ These examples find the first occurrence in [Text][Text Property] with [Search O | TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Match.Value | Match.Groups["startsWith"].Value | Match.Groups["contains"].Value | Match.Groups["endsWith"].Value | |------------|----------|----------|--------------|------------------|----------------|----------------| -| `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | -| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | +| `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | +| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | | `"The"` | `""` | `"brown"` | No Match | No Match | N/A | No Match | -| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | -| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | -| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | -| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | +| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | +| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | +| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | +| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | | `""` | `""` | `""` | No Match | N/A | N/A | N/A | -| `"The"` | `"quick"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `"The"` | `"*"` | `"brown"` | `"The quick brown"` | `"The"` | `" quick "` | `"brown"` | -| `"The"` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | `""` | -| `"The"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | N/A | -| `"The"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | N/A | `" quick brown fox jumps over the lazy dog."` | -| `"*"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The "` | `"quick"` | `"brown"` | -| `"*"` | `"quick"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The "` | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `"*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | N/A | -| `"*"` | `"*"` | `"brown"` | `"The quick brown"` | `"The quick "` | `""` | `"brown"` | -| `"*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | N/A | `"brown"` | -| `"*"` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | `""` | -| `"*"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | N/A | -| `"*"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | `""` | -| `"*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | -| `""` | `"quick"` | `"*"` | `"quick brown fox jumps over the lazy dog."` | N/A | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `""` | `"*"` | `"brown"` | `"The quick brown"` | N/A | `"The quick "` | `"brown"` | -| `""` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | `""` | -| `""` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | N/A | -| `""` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | `"The quick brown fox jumps over the lazy dog."` | +| `"The"` | `"quick"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `"The"` | `"*"` | `"brown"` | `"The quick brown"` | `"The"` | `" quick "` | `"brown"` | +| `"The"` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | `""` | +| `"The"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | N/A | +| `"The"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | N/A | `" quick brown fox jumps over the lazy dog."` | +| `"*"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The "` | `"quick"` | `"brown"` | +| `"*"` | `"quick"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The "` | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `"*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | N/A | +| `"*"` | `"*"` | `"brown"` | `"The quick brown"` | `"The quick "` | `""` | `"brown"` | +| `"*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | N/A | `"brown"` | +| `"*"` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | `""` | +| `"*"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | N/A | +| `"*"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | `""` | +| `"*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | +| `""` | `"quick"` | `"*"` | `"quick brown fox jumps over the lazy dog."` | N/A | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `""` | `"*"` | `"brown"` | `"The quick brown"` | N/A | `"The quick "` | `"brown"` | +| `""` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | `""` | +| `""` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | N/A | +| `""` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | `"The quick brown fox jumps over the lazy dog."` | #### SearchOptions.Regex @@ -409,33 +409,33 @@ These examples find the first occurrence in [Text][Text Property] with [Search O | TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Match.Value | Match.Groups["startsWith"].Value | Match.Groups["contains"].Value | Match.Groups["endsWith"].Value | |------------|----------|----------|--------------|------------------|----------------|----------------| -| `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | -| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | +| `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | +| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | | `"The"` | `""` | `"brown"` | No Match | No Match | N/A | No Match | -| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | -| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | -| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | -| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | +| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | +| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | +| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | +| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | | `""` | `""` | `""` | No Match | N/A | N/A | N/A | -| `"The"` | `"quick"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `"The"` | `".*"` | `"brown"` | `"The quick brown"` | `"The"` | `" quick "` | `"brown"` | -| `"The"` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | `""` | -| `"The"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | N/A | -| `"The"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | N/A | `" quick brown fox jumps over the lazy dog."` | -| `".*"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The "` | `"quick"` | `"brown"` | -| `".*"` | `"quick"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The "` | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `".*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | N/A | -| `".*"` | `".*"` | `"brown"` | `"The quick brown"` | `"The quick "` | `""` | `"brown"` | -| `".*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | N/A | `"brown"` | -| `".*"` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | `""` | -| `".*"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | N/A | -| `".*"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | `""` | -| `".*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | -| `""` | `"quick"` | `".*"` | `"quick brown fox jumps over the lazy dog."` | N/A | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `""` | `".*"` | `"brown"` | `"The quick brown"` | N/A | `"The quick "` | `"brown"` | -| `""` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | `""` | -| `""` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | N/A | -| `""` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | `"The quick brown fox jumps over the lazy dog."` | +| `"The"` | `"quick"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `"The"` | `".*"` | `"brown"` | `"The quick brown"` | `"The"` | `" quick "` | `"brown"` | +| `"The"` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | `""` | +| `"The"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | N/A | +| `"The"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | N/A | `" quick brown fox jumps over the lazy dog."` | +| `".*"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The "` | `"quick"` | `"brown"` | +| `".*"` | `"quick"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The "` | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `".*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | N/A | +| `".*"` | `".*"` | `"brown"` | `"The quick brown"` | `"The quick "` | `""` | `"brown"` | +| `".*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | N/A | `"brown"` | +| `".*"` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | `""` | +| `".*"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | N/A | +| `".*"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | `""` | +| `".*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | +| `""` | `"quick"` | `".*"` | `"quick brown fox jumps over the lazy dog."` | N/A | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `""` | `".*"` | `"brown"` | `"The quick brown"` | N/A | `"The quick "` | `"brown"` | +| `""` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | `""` | +| `""` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | N/A | +| `""` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | `"The quick brown fox jumps over the lazy dog."` | ### Comparison Types From 0531c8d242d4d21832bd2fa39d95aef093593fd3 Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Wed, 6 Dec 2023 11:43:17 +0000 Subject: [PATCH 21/22] typos --- .../Blocks/Text/find-text/find-all-text-block.md | 16 ++++++++-------- .../Blocks/Text/find-text/find-text-block.md | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md index e5b44fd1b..4e56bcfc4 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md @@ -237,7 +237,7 @@ The [Text To Find][TextToFind Property] search query to find all occurrences of * `*` wildcard character can be used to match `0` or more characters. * `?` wildcard character can be used to match `0` or `1` character. * All other characters are treated as a literal character. -* `SearchOptions.Regex` allows regex text matching using [.Net Regex Syntax][Regex Syntax]. +* `SearchOptions.Regex` allows regex text matching using [.NET Regex Syntax][Regex Syntax]. Please note that overlapping matches are not detected (i.e. searching for `"aa"` in `"aaa"` matches `"aa"` at index `0` but not `"aa"` at index `1`). @@ -307,10 +307,10 @@ These sections contain tables for the examples. The columns of these tables are | TextToFind.StartsWith | Value used to define the StartsWith property of [Text To Find][TextToFind Property]. | | TextToFind.Contains | Value used to define the Contains property of [Text To Find][TextToFind Property]. | | TextToFind.EndsWith | Value used to define the EndsWith property of [Text To Find][TextToFind Property]. | -| Matches[0].Value | Output [Matches][Matches Property] returned from the operation. This is `No Match` in the case of no valid match found. | -| Matches[0].Groups["startsWith"].Value | The value of the "startsWith" Group within the first match in the output [Matches][Matches Property]. This is N/A in the case that this group is not returned for this match. This is `No Match` in the case of no valid match existing. | -| Matches[0].Groups["contains"].Value | The value of the "contains" Group within the first match in the output [Matches][Matches Property]. This is N/A in the case that this group is not returned for this match. This is `No Match` in the case of no valid match existing. | -| Matches[0].Groups["endsWith"].Value | The value of the "endsWith" Group within the first match in the output [Matches][Matches Property]. This is N/A in the case that this group is not returned for this match. This is `No Match` in the case of no valid match existing. | +| Matches[0].Value | Output [Matches][Matches Property] returned from the operation. This is No Match in the case of no valid match existing. | +| Matches[0].Groups["startsWith"].Value | The value of the "startsWith" Group within the first match in the output [Matches][Matches Property]. This is N/A in the case that this group is not returned for this match. This is No Match in the case of no valid match existing. | +| Matches[0].Groups["contains"].Value | The value of the "contains" Group within the first match in the output [Matches][Matches Property]. This is N/A in the case that this group is not returned for this match. This is No Match in the case of no valid match existing. | +| Matches[0].Groups["endsWith"].Value | The value of the "endsWith" Group within the first match in the output [Matches][Matches Property]. This is N/A in the case that this group is not returned for this match. This is No Match in the case of no valid match existing. | Please note that these examples all perform a search which has at most 1 valid match in the text. @@ -318,7 +318,7 @@ Please note that these examples all perform a search which has at most 1 valid m These examples find the first occurrence in [Text][Text Property] with [Search Options][SearchOptions Property] set to `ContainsText` using a [case-sensitive, culture-insensitive][Ordinal] search. -| TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Matches.Value | Matches.Groups["startsWith"].Value | Matches.Groups["contains"].Value | Matches.Groups["endsWith"].Value | +| TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Matches[0].Value | Matches[0].Groups["startsWith"].Value | Matches[0].Groups["contains"].Value | Matches[0].Groups["endsWith"].Value | |------------|----------|----------|--------------|------------------|----------------|----------------| | `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | | `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | @@ -333,7 +333,7 @@ These examples find the first occurrence in [Text][Text Property] with [Search O These examples find the first occurrence in [Text][Text Property] with [Search Options][SearchOptions Property] set to `PatternMatching` using a [case-sensitive, culture-insensitive][Ordinal] search. -| TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Matches.Value | Matches.Groups["startsWith"].Value | Matches.Groups["contains"].Value | Matches.Groups["endsWith"].Value | +| TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Matches[0].Value | Matches[0].Groups["startsWith"].Value | Matches[0].Groups["contains"].Value | Matches[0].Groups["endsWith"].Value | |------------|----------|----------|--------------|------------------|----------------|----------------| | `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | | `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | @@ -367,7 +367,7 @@ These examples find the first occurrence in [Text][Text Property] with [Search O These examples find the first occurrence in [Text][Text Property] with [Search Options][SearchOptions Property] set to `Regex` using a [case-sensitive, culture-insensitive][Ordinal] search. -| TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Matches.Value | Matches.Groups["startsWith"].Value | Matches.Groups["contains"].Value | Matches.Groups["endsWith"].Value | +| TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Matches[0].Value | Matches[0].Groups["startsWith"].Value | Matches[0].Groups["contains"].Value | Matches[0].Groups["endsWith"].Value | |------------|----------|----------|--------------|------------------|----------------|----------------| | `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | | `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md index 5d1050b8e..befe4a433 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md @@ -349,10 +349,10 @@ These sections contain tables for the examples. The columns of these tables are | TextToFind.StartsWith | Value used to define the StartsWith property of [Text To Find][TextToFind Property]. | | TextToFind.Contains | Value used to define the Contains property of [Text To Find][TextToFind Property]. | | TextToFind.EndsWith | Value used to define the EndsWith property of [Text To Find][TextToFind Property]. | -| Match.Value | Output [Match][] returned from the operation. This is `No Match` in the case of no valid match found. | -| Match.Groups["startsWith"].Value | The value of the "startsWith" Group within the output [Match][]. This is N/A in the case that this group is not returned in the output [Match][]. | -| Match.Groups["contains"].Value | The value of the "contains" Group within the output [Match][]. This is N/A in the case that this group is not returned in the output [Match][]. | -| Match.Groups["endsWith"].Value | The value of the "endsWith" Group within the output [Match][]. This is N/A in the case that this group is not returned in the output [Match][]. | +| Match.Value | Output [Match][Match Property] returned from the operation. This is `No Match` in the case of no valid match found. | +| Match.Groups["startsWith"].Value | The value of the "startsWith" Group within the output [Match][Match Property]. This is N/A in the case that this group is not returned in the output [Match][Match Property]. | +| Match.Groups["contains"].Value | The value of the "contains" Group within the output [Match][Match Property]. This is N/A in the case that this group is not returned in the output [Match][Match Property]. | +| Match.Groups["endsWith"].Value | The value of the "endsWith" Group within the output [Match][Match Property]. This is N/A in the case that this group is not returned in the output [Match][Match Property]. | #### SearchOptions.ContainsText From adb57f4ef063c9e8a27cbb51749d31215f4260cf Mon Sep 17 00:00:00 2001 From: Anan Venkatesh Date: Thu, 7 Dec 2023 09:05:31 +0000 Subject: [PATCH 22/22] signoff --- .../Text/find-text/find-all-text-block.md | 147 +++++++++-------- .../Blocks/Text/find-text/find-text-block.md | 156 +++++++++--------- 2 files changed, 160 insertions(+), 143 deletions(-) diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md index 4e56bcfc4..c840e7f8f 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-all-text-block.md @@ -17,9 +17,7 @@ Finds all occurrences of [Text To Find][TextToFind Property] in a given [Text][T ## Examples -The below are basic examples of how to use this block. For more detail of how to use [Search Options][SearchOptions Property] to use [Pattern Matching][Pattern Matching Syntax] or [Regex][Regex Syntax], or how [Text To Find][TextToFind Property] fields affect this blocks' behaviour, please see [Advanced Examples][]. - -### Find all occurrences of text +### Find All Occurrences when there are multiple matches This example will find all occurrences of `"The"` in `"The quick brown fox jumps over the lazy dog."`. @@ -30,14 +28,14 @@ It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] compari | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| | [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "o", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "o", endsWith: "")` | `($)TextToFind` is a variable of type [TextToFind][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "The", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "The", endsWith: "")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | -| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | +| [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | | [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [List][]<[Match][]> value | #### Result -As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog."` contains the text `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. Therefore, the variable `($)Matches` will be updated to the following: +As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text (`"The quick brown fox jumps over the lazy dog."`), the text contains `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. Therefore, the variable `($)Matches` will be updated to the following: ```json [ @@ -106,7 +104,11 @@ As this example is performing a [case-insensitive, culture-insensitive][OrdinalI ] ``` -### Find all occurrences of text (1 valid match) +For more information on using [SearchOptions][SearchOptions Property] and [Text To Find][TextToFind Property] see [Advanced Examples][]. + +*** + +### Find All occurrences when there is a single match This example will find all occurrences of `"The"` in `"The quick brown fox jumps over the lazy dog."`. @@ -124,7 +126,7 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. #### Result -As this example is performing a [case-sensitive, culture-insensitive][Ordinal] comparison of text, `"The quick brown fox jumps over the lazy dog."` only contains the text `"The"` once; `"the"` has a different case so does not match. Therefore, the variable `($)Matches` will be set to the following: +As this example is performing a [case-sensitive, culture-insensitive][Ordinal] comparison of text (`"The quick brown fox jumps over the lazy dog."`), the text contains `"The"` once; `"the"` has a different case so does not match. Therefore, the variable `($)Matches` will be set to the following: ```json [ @@ -162,11 +164,13 @@ As this example is performing a [case-sensitive, culture-insensitive][Ordinal] c ] ``` +For more information on using [SearchOptions][SearchOptions Property] and [Text To Find][TextToFind Property] see [Advanced Examples][]. + *** -### Find all occurrences of text (0 valid matches) +### Find All occurrences when there are no matches -This example will find all occurrences of `"banana"` in `"The quick brown fox jumps over the lazy dog."`. +This example will find all occurrences of `"cat"` in `"The quick brown fox jumps over the lazy dog."`. It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. @@ -175,19 +179,21 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. | Property | Value | Notes | |--------------------|---------------------------|------------------------------------------| | [Text][Text Property] | `($)Text`, with value `"The quick brown fox jumps over the lazy dog."` | `($)Text` is a variable of type [String][] | -| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "banana", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "banana", endsWith: "")` | `($)TextToFind` is a variable of type [TextToFind][] | +| [Text To Find][TextToFind Property] | `($)TextToFind`, with value `{"startsWith": "", "contains": "cat", "endsWith": ""}`

In this example `($)TextToFind` has been set up using the following [Expression][]:

`new TextToFind(startsWith: "", contains: "cat", endsWith: "")` | `($)TextToFind` is a variable of type [TextToFind][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | | [Matches][Matches Property] | `($)Matches`, with no value | `($)Matches` is a variable that will be set to an [List][]<[Match][]> value | #### Results -`"The quick brown fox jumps over the lazy dog."` does not contain an occurrence of `"banana"`. Therefore, `($)Matches` will be set to the following: +`"The quick brown fox jumps over the lazy dog."` does not contain an occurrence of `"cat"`. Therefore, `($)Matches` will be set to the following: ```json [] ``` +For more information on using [SearchOptions][SearchOptions Property] and [Text To Find][TextToFind Property] see [Advanced Examples][]. + *** ## Properties @@ -290,29 +296,32 @@ The exceptions thrown by the block can be found below: ### Advanced Examples -The following sections will show examples for each of the [SearchOptions][]. +The following sections will show examples for each possible value of [Search Options][SearchOptions Property]. + +In these examples, the following properties are common: -In these examples, the following properties are common and will be configured as follows: | Property | Value | |----------|-------| | [Text][Text Property] | `"The quick brown fox jumps over the lazy dog."` | +| [Occurrence][Occurrence Property] | `1` | | [Comparison Type][ComparisonType Property] | `Ordinal` | | [Matches][Matches Property] | `($)Matches` with no value | -The other properties are defined elsewhere in the sections below. - These sections contain tables for the examples. The columns of these tables are explained below: + | Column Name | Explanation | |-------------|-------------| | TextToFind.StartsWith | Value used to define the StartsWith property of [Text To Find][TextToFind Property]. | | TextToFind.Contains | Value used to define the Contains property of [Text To Find][TextToFind Property]. | | TextToFind.EndsWith | Value used to define the EndsWith property of [Text To Find][TextToFind Property]. | -| Matches[0].Value | Output [Matches][Matches Property] returned from the operation. This is No Match in the case of no valid match existing. | -| Matches[0].Groups["startsWith"].Value | The value of the "startsWith" Group within the first match in the output [Matches][Matches Property]. This is N/A in the case that this group is not returned for this match. This is No Match in the case of no valid match existing. | -| Matches[0].Groups["contains"].Value | The value of the "contains" Group within the first match in the output [Matches][Matches Property]. This is N/A in the case that this group is not returned for this match. This is No Match in the case of no valid match existing. | -| Matches[0].Groups["endsWith"].Value | The value of the "endsWith" Group within the first match in the output [Matches][Matches Property]. This is N/A in the case that this group is not returned for this match. This is No Match in the case of no valid match existing. | +| Matches[0].Value | The Value property of the first match of the [Matches][Matches Property] returned. \* | +| Matches[0].Groups["startsWith"].Value | The value of the "startsWith" Group within the first match of the [Matches][Matches Property]. \* | +| Matches[0].Groups["contains"].Value | The value of the "contains" Group within the first match of the [Matches][Matches Property]. \* | +| Matches[0].Groups["endsWith"].Value | The value of the "endsWith" Group within the first match of the [Matches][Matches Property]. \* | + +\* *No Match* indicates that no match was found and *N/A* indicates that the group is not returned as part of the [Matches][Matches Property]. -Please note that these examples all perform a search which has at most 1 valid match in the text. +Please note that these examples all perform a search which has at most one valid match in the text. #### SearchOptions.ContainsText @@ -321,13 +330,13 @@ These examples find the first occurrence in [Text][Text Property] with [Search O | TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Matches[0].Value | Matches[0].Groups["startsWith"].Value | Matches[0].Groups["contains"].Value | Matches[0].Groups["endsWith"].Value | |------------|----------|----------|--------------|------------------|----------------|----------------| | `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | -| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | -| `"The"` | `""` | `"brown"` | No Match | No Match | N/A | No Match | -| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | -| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | -| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | -| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | -| `""` | `""` | `""` | No Match | N/A | N/A | N/A | +| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | *N/A* | +| `"The"` | `""` | `"brown"` | *No Match* | *No Match* | *N/A* | *No Match* | +| `"The"` | `""` | `""` | `"The"` | `"The"` | *N/A* | *N/A* | +| `""` | `"quick"` | `"brown"` | `"quick brown"` | *N/A* | `"quick"` | `"brown"` | +| `""` | `"quick"` | `""` | `"quick"` | *N/A* | `"quick"` | *N/A* | +| `""` | `""` | `"brown"` | `"brown"` | *N/A* | *N/A* | `"brown"` | +| `""` | `""` | `""` | *No Match* | *N/A* | *N/A* | *N/A* | #### SearchOptions.PatternMatching @@ -336,32 +345,32 @@ These examples find the first occurrence in [Text][Text Property] with [Search O | TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Matches[0].Value | Matches[0].Groups["startsWith"].Value | Matches[0].Groups["contains"].Value | Matches[0].Groups["endsWith"].Value | |------------|----------|----------|--------------|------------------|----------------|----------------| | `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | -| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | -| `"The"` | `""` | `"brown"` | No Match | No Match | N/A | No Match | -| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | -| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | -| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | -| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | -| `""` | `""` | `""` | No Match | N/A | N/A | N/A | +| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | *N/A* | +| `"The"` | `""` | `"brown"` | *No Match* | *No Match* | *N/A* | *No Match* | +| `"The"` | `""` | `""` | `"The"` | `"The"` | *N/A* | *N/A* | +| `""` | `"quick"` | `"brown"` | `"quick brown"` | *N/A* | `"quick"` | `"brown"` | +| `""` | `"quick"` | `""` | `"quick"` | *N/A* | `"quick"` | *N/A* | +| `""` | `""` | `"brown"` | `"brown"` | *N/A* | *N/A* | `"brown"` | +| `""` | `""` | `""` | *No Match* | *N/A* | *N/A* | *N/A* | | `"The"` | `"quick"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `"quick"` | `" brown fox jumps over the lazy dog."` | | `"The"` | `"*"` | `"brown"` | `"The quick brown"` | `"The"` | `" quick "` | `"brown"` | | `"The"` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | `""` | -| `"The"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | N/A | -| `"The"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | N/A | `" quick brown fox jumps over the lazy dog."` | +| `"The"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | *N/A* | +| `"The"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | *N/A* | `" quick brown fox jumps over the lazy dog."` | | `"*"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The "` | `"quick"` | `"brown"` | | `"*"` | `"quick"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The "` | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `"*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | N/A | +| `"*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | *N/A* | | `"*"` | `"*"` | `"brown"` | `"The quick brown"` | `"The quick "` | `""` | `"brown"` | -| `"*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | N/A | `"brown"` | +| `"*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | *N/A* | `"brown"` | | `"*"` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | `""` | -| `"*"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | N/A | -| `"*"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | `""` | -| `"*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | -| `""` | `"quick"` | `"*"` | `"quick brown fox jumps over the lazy dog."` | N/A | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `""` | `"*"` | `"brown"` | `"The quick brown"` | N/A | `"The quick "` | `"brown"` | -| `""` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | `""` | -| `""` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | N/A | -| `""` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | `"The quick brown fox jumps over the lazy dog."` | +| `"*"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | *N/A* | +| `"*"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | `""` | +| `"*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | *N/A* | +| `""` | `"quick"` | `"*"` | `"quick brown fox jumps over the lazy dog."` | *N/A* | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `""` | `"*"` | `"brown"` | `"The quick brown"` | *N/A* | `"The quick "` | `"brown"` | +| `""` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | `"The quick brown fox jumps over the lazy dog."` | `""` | +| `""` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | `"The quick brown fox jumps over the lazy dog."` | *N/A* | +| `""` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | *N/A* | `"The quick brown fox jumps over the lazy dog."` | #### SearchOptions.Regex @@ -370,32 +379,32 @@ These examples find the first occurrence in [Text][Text Property] with [Search O | TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Matches[0].Value | Matches[0].Groups["startsWith"].Value | Matches[0].Groups["contains"].Value | Matches[0].Groups["endsWith"].Value | |------------|----------|----------|--------------|------------------|----------------|----------------| | `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | -| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | -| `"The"` | `""` | `"brown"` | No Match | No Match | N/A | No Match | -| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | -| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | -| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | -| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | -| `""` | `""` | `""` | No Match | N/A | N/A | N/A | +| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | *N/A* | +| `"The"` | `""` | `"brown"` | *No Match* | *No Match* | *N/A* | *No Match* | +| `"The"` | `""` | `""` | `"The"` | `"The"` | *N/A* | *N/A* | +| `""` | `"quick"` | `"brown"` | `"quick brown"` | *N/A* | `"quick"` | `"brown"` | +| `""` | `"quick"` | `""` | `"quick"` | *N/A* | `"quick"` | *N/A* | +| `""` | `""` | `"brown"` | `"brown"` | *N/A* | *N/A* | `"brown"` | +| `""` | `""` | `""` | *No Match* | *N/A* | *N/A* | *N/A* | | `"The"` | `"quick"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `"quick"` | `" brown fox jumps over the lazy dog."` | | `"The"` | `".*"` | `"brown"` | `"The quick brown"` | `"The"` | `" quick "` | `"brown"` | | `"The"` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | `""` | -| `"The"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | N/A | -| `"The"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | N/A | `" quick brown fox jumps over the lazy dog."` | +| `"The"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | *N/A* | +| `"The"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | *N/A* | `" quick brown fox jumps over the lazy dog."` | | `".*"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The "` | `"quick"` | `"brown"` | | `".*"` | `"quick"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The "` | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `".*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | N/A | +| `".*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | *N/A* | | `".*"` | `".*"` | `"brown"` | `"The quick brown"` | `"The quick "` | `""` | `"brown"` | -| `".*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | N/A | `"brown"` | +| `".*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | *N/A* | `"brown"` | | `".*"` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | `""` | -| `".*"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | N/A | -| `".*"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | `""` | -| `".*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | -| `""` | `"quick"` | `".*"` | `"quick brown fox jumps over the lazy dog."` | N/A | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `""` | `".*"` | `"brown"` | `"The quick brown"` | N/A | `"The quick "` | `"brown"` | -| `""` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | `""` | -| `""` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | N/A | -| `""` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | `"The quick brown fox jumps over the lazy dog."` | +| `".*"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | *N/A* | +| `".*"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | `""` | +| `".*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | *N/A* | +| `""` | `"quick"` | `".*"` | `"quick brown fox jumps over the lazy dog."` | *N/A* | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `""` | `".*"` | `"brown"` | `"The quick brown"` | *N/A* | `"The quick "` | `"brown"` | +| `""` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | `"The quick brown fox jumps over the lazy dog."` | `""` | +| `""` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | `"The quick brown fox jumps over the lazy dog."` | *N/A* | +| `""` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | *N/A* | `"The quick brown fox jumps over the lazy dog."` | ### Comparison Types @@ -403,15 +412,15 @@ For information about the [supported values][ComparisonTypes] for the [Compariso ### Null or empty Text -If [Text][Text Property] is `null` or empty (i.e. `""`) there is nothing to find in, so no operation is performed. +If [Text][Text Property] is `null` or empty (i.e. `""`) no operation is performed and [Matches][Matches Property] is set to an empty [List][]<[Match][]>. ### Null or empty Text To Find -If all properties of [Text To Find][TextToFind Property] are `null` or empty (i.e. `""`) there is nothing to find, so no operation is performed, and [Matches][Matches Property] is set to an empty [List][]<[Match][]>. +If all properties of [Text To Find][TextToFind Property] are `null` or empty (i.e. `""`) no operation is performed and [Matches][Matches Property] is set to an empty [List][]<[Match][]>. ### Null or empty property of Text To Find -If a property of [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), then that section of the query is not considered for a valid match and is not included as a specific [Group][] in the returned [Match][]; see [Advanced Examples][]. +If a property of [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), then it is not included as a specific [Group][] for any [Match][] within the returned [Matches][Matches Property]; see [Advanced Examples][]. ### Known Limitations diff --git a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md index befe4a433..df4e117b1 100644 --- a/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md +++ b/content/en/docs/2023.11/Reference/Blocks/Text/find-text/find-text-block.md @@ -17,11 +17,9 @@ Finds the specified [Occurrence][Occurrence Property] of [Text To Find][TextToFi ## Examples -The below are basic examples of how to use this block. For more detail of how to use [Search Options][SearchOptions Property] to use [Pattern Matching][Pattern Matching Syntax] or [Regex][Regex Syntax], or how [Text To Find][TextToFind Property] fields affect this blocks' behaviour, please see [Advanced Examples][]. - ### Find the first Occurrence of text -This example will find the first occurrence of `"The"` in `"The quick brown fox jumps over the lazy dog."`. +This example will find the first [occurrence][Occurrence Property] of `"The"` in `"The quick brown fox jumps over the lazy dog."`. It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. @@ -34,11 +32,11 @@ It performs a [case-sensitive, culture-insensitive][Ordinal] comparison of text. | [Occurrence][Occurrence Property] | `($)Occurrence`, with value `1` | `($)Occurrence` is a variable of type [Int32][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.Ordinal` | `($)ComparisonType` is a variable of type [StringComparison][] | -| [Match][Match Property] | `($)Match`, with no value | `($)Match` is a variable that will be set to an [Match][] value | +| [Match][Match Property] | `($)Match`, with no value | `($)Match` is a variable that will be set to a [Match][] value | #### Result -As this example is performing a [case-sensitive, culture-insensitive][Ordinal] comparison of text, `"The quick brown fox jumps over the lazy dog."` only contains the text `"The"` once; `"the"` has a different case so does not match. Therefore, the variable `($)Match` will be set to the following: +As this example is performing a [case-sensitive, culture-insensitive][Ordinal] comparison of text (`"The quick brown fox jumps over the lazy dog."`), the text contains `"The"` once; `"the"` has a different case so does not match. Therefore, the variable `($)Match` will be set to the following: ```json { @@ -74,11 +72,13 @@ As this example is performing a [case-sensitive, culture-insensitive][Ordinal] c } ``` +For more information on using [Search Options][SearchOptions Property] and [Text To Find][TextToFind Property] see [Advanced Examples][]. + *** ### Find the second Occurrence of text -This example will find the second occurrence of `"The"` in `"The quick brown fox jumps over the lazy dog."`. +This example will find the second [occurrence][Occurrence Property] of `"The"` in `"The quick brown fox jumps over the lazy dog."`. It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text. @@ -91,11 +91,11 @@ It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] compari | [Occurrence][Occurrence Property] | `($)Occurrence`, with value `2` | `($)Occurrence` is a variable of type [Int32][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | -| [Match][Match Property] | `($)Match`, with no value | `($)Match` is a variable that will be set to an [Match][] value | +| [Match][Match Property] | `($)Match`, with no value | `($)Match` is a variable that will be set to a [Match][] value | #### Result -As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog."` contains the text `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. Therefore, the variable `($)Match` will be set to the following: +As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of the text (`"The quick brown fox jumps over the lazy dog."`), the text contains `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. Therefore, the variable `($)Match` will be set to the following: ```json { @@ -131,11 +131,13 @@ As this example is performing a [case-insensitive, culture-insensitive][OrdinalI } ``` +For more information on using [SearchOptions][SearchOptions Property] and [Text To Find][TextToFind Property] see [Advanced Examples][]. + *** ### Find the last Occurrence of text -This example will find the last occurrence of `"The"` in `"The quick brown fox jumps over the lazy dog."`. +This example will find the last [occurrence][Occurrence Property] of `"The"` in `"The quick brown fox jumps over the lazy dog."`. It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text. @@ -148,11 +150,11 @@ It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] compari | [Occurrence][Occurrence Property] | `($)Occurrence`, with value `-1` | `($)Occurrence` is a variable of type [Int32][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | -| [Match][Match Property] | `($)Match`, with no value | `($)Match` is a variable that will be set to an [Match][] value | +| [Match][Match Property] | `($)Match`, with no value | `($)Match` is a variable that will be set to a [Match][] value | #### Result -As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog."` contains the text `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. The second occurrence is the last occurrence, and therefore, the variable `($)Match` will be set to the following: +As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of the text (`"The quick brown fox jumps over the lazy dog."`), the text contains `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. The second occurrence is also the last occurrence, and therefore, the variable `($)Match` will be set to the following: ```json { @@ -188,11 +190,13 @@ As this example is performing a [case-insensitive, culture-insensitive][OrdinalI } ``` +For more information on using [SearchOptions][SearchOptions Property] and [Text To Find][TextToFind Property] see [Advanced Examples][]. + *** ### Find an invalid Occurrence of text -This example will find the third occurrence of `"The"`, which is not present, in `"The quick brown fox jumps over the lazy dog."`. +This example will find the third [occurrence][Occurrence Property] of `"The"`, which is not present, in `"The quick brown fox jumps over the lazy dog."`. It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text. @@ -205,16 +209,18 @@ It performs a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] compari | [Occurrence][Occurrence Property] | `($)Occurrence`, with value `3` | `($)Occurrence` is a variable of type [Int32][] | | [Search Options][SearchOptions Property] | `($)SearchOptions`, with value `SearchOptions.ContainsText` | `($)SearchOptions` is a variable of type [SearchOptions][] | | [Comparison Type][ComparisonType Property] | `($)ComparisonType`, with value `StringComparison.OrdinalIgnoreCase` | `($)ComparisonType` is a variable of type [StringComparison][] | -| [Match][Match Property] | `($)Match`, with no value | `($)Match` is a variable that will be set to an [Match][] value | +| [Match][Match Property] | `($)Match`, with no value | `($)Match` is a variable that will be set to a [Match][] value | #### Result -As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of text, `"The quick brown fox jumps over the lazy dog."` contains the text `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. There is no match for the third [Occurrence][Occurrence Property]. Therefore, the variable `($)Match` will be set to the following: +As this example is performing a [case-insensitive, culture-insensitive][OrdinalIgnoreCase] comparison of the text (`"The quick brown fox jumps over the lazy dog."`), the text contains `"The"` twice; the first occurrence is `"The"` and the second occurrence is `"the"`. There is no match for the third occurrence. Therefore, the variable `($)Match` will be set to the following: ```json null ``` +For more information on using [SearchOptions][SearchOptions Property] and [Text To Find][TextToFind Property] see [Advanced Examples][]. + *** ## Properties @@ -331,9 +337,10 @@ The exceptions thrown by the block can be found below: ### Advanced Examples -The following sections will show examples for each of the [SearchOptions][]. +The following sections will show examples for each possible value of [Search Options][SearchOptions Property]. + +In these examples, the following properties are common: -In these examples, the following properties are common and will be configured as follows: | Property | Value | |----------|-------| | [Text][Text Property] | `"The quick brown fox jumps over the lazy dog."` | @@ -341,101 +348,102 @@ In these examples, the following properties are common and will be configured as | [Comparison Type][ComparisonType Property] | `Ordinal` | | [Match][] | `($)Match` with no value | -The other properties are defined elsewhere in the sections below. - These sections contain tables for the examples. The columns of these tables are explained below: + | Column Name | Explanation | |-------------|-------------| | TextToFind.StartsWith | Value used to define the StartsWith property of [Text To Find][TextToFind Property]. | | TextToFind.Contains | Value used to define the Contains property of [Text To Find][TextToFind Property]. | | TextToFind.EndsWith | Value used to define the EndsWith property of [Text To Find][TextToFind Property]. | -| Match.Value | Output [Match][Match Property] returned from the operation. This is `No Match` in the case of no valid match found. | -| Match.Groups["startsWith"].Value | The value of the "startsWith" Group within the output [Match][Match Property]. This is N/A in the case that this group is not returned in the output [Match][Match Property]. | -| Match.Groups["contains"].Value | The value of the "contains" Group within the output [Match][Match Property]. This is N/A in the case that this group is not returned in the output [Match][Match Property]. | -| Match.Groups["endsWith"].Value | The value of the "endsWith" Group within the output [Match][Match Property]. This is N/A in the case that this group is not returned in the output [Match][Match Property]. | +| Match.Value | The Value property of the [Match][Match Property] returned. \* | +| Match.Groups["startsWith"].Value | The value of the "startsWith" Group within the [Match][Match Property]. \* | +| Match.Groups["contains"].Value | The value of the "contains" Group within the [Match][Match Property]. \* | +| Match.Groups["endsWith"].Value | The value of the "endsWith" Group within the [Match][Match Property]. \* | + +\* *No Match* indicates that no match was found and *N/A* indicates that the group is not returned as part of the [Match][Match Property]. #### SearchOptions.ContainsText -These examples find the first occurrence in [Text][Text Property] with [Search Options][SearchOptions Property] set to `ContainsText` using a [case-sensitive, culture-insensitive][Ordinal] search. +These examples find the first occurrence in [Text][Text Property] with [Search Options][SearchOptions Property] set to `ContainsText`. | TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Match.Value | Match.Groups["startsWith"].Value | Match.Groups["contains"].Value | Match.Groups["endsWith"].Value | |------------|----------|----------|--------------|------------------|----------------|----------------| | `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | -| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | -| `"The"` | `""` | `"brown"` | No Match | No Match | N/A | No Match | -| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | -| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | -| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | -| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | -| `""` | `""` | `""` | No Match | N/A | N/A | N/A | +| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | *N/A* | +| `"The"` | `""` | `"brown"` | *No Match* | *No Match* | *N/A* | *No Match* | +| `"The"` | `""` | `""` | `"The"` | `"The"` | *N/A* | *N/A* | +| `""` | `"quick"` | `"brown"` | `"quick brown"` | *N/A* | `"quick"` | `"brown"` | +| `""` | `"quick"` | `""` | `"quick"` | *N/A* | `"quick"` | *N/A* | +| `""` | `""` | `"brown"` | `"brown"` | *N/A* | *N/A* | `"brown"` | +| `""` | `""` | `""` | *No Match* | *N/A* | *N/A* | *N/A* | #### SearchOptions.PatternMatching -These examples find the first occurrence in [Text][Text Property] with [Search Options][SearchOptions Property] set to `PatternMatching` using a [case-sensitive, culture-insensitive][Ordinal] search. +These examples find the first occurrence in [Text][Text Property] with [Search Options][SearchOptions Property] set to `PatternMatching`. -| TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Match.Value | Match.Groups["startsWith"].Value | Match.Groups["contains"].Value | Match.Groups["endsWith"].Value | +| TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Match.Value | Match.Groups["startsWith"].Value | Match.Groups["contains"].Value | Match.Groups["endsWith"].Value | |------------|----------|----------|--------------|------------------|----------------|----------------| | `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | -| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | -| `"The"` | `""` | `"brown"` | No Match | No Match | N/A | No Match | -| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | -| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | -| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | -| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | -| `""` | `""` | `""` | No Match | N/A | N/A | N/A | +| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | *N/A* | +| `"The"` | `""` | `"brown"` | *No Match* | *No Match* | *N/A* | *No Match* | +| `"The"` | `""` | `""` | `"The"` | `"The"` | *N/A* | *N/A* | +| `""` | `"quick"` | `"brown"` | `"quick brown"` | *N/A* | `"quick"` | `"brown"` | +| `""` | `"quick"` | `""` | `"quick"` | *N/A* | `"quick"` | *N/A* | +| `""` | `""` | `"brown"` | `"brown"` | *N/A* | *N/A* | `"brown"` | +| `""` | `""` | `""` | *No Match* | *N/A* | *N/A* | *N/A* | | `"The"` | `"quick"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `"quick"` | `" brown fox jumps over the lazy dog."` | | `"The"` | `"*"` | `"brown"` | `"The quick brown"` | `"The"` | `" quick "` | `"brown"` | | `"The"` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | `""` | -| `"The"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | N/A | -| `"The"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | N/A | `" quick brown fox jumps over the lazy dog."` | +| `"The"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | *N/A* | +| `"The"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | *N/A* | `" quick brown fox jumps over the lazy dog."` | | `"*"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The "` | `"quick"` | `"brown"` | | `"*"` | `"quick"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The "` | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `"*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | N/A | +| `"*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | *N/A* | | `"*"` | `"*"` | `"brown"` | `"The quick brown"` | `"The quick "` | `""` | `"brown"` | -| `"*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | N/A | `"brown"` | +| `"*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | *N/A* | `"brown"` | | `"*"` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | `""` | -| `"*"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | N/A | -| `"*"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | `""` | -| `"*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | -| `""` | `"quick"` | `"*"` | `"quick brown fox jumps over the lazy dog."` | N/A | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `""` | `"*"` | `"brown"` | `"The quick brown"` | N/A | `"The quick "` | `"brown"` | -| `""` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | `""` | -| `""` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | N/A | -| `""` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | `"The quick brown fox jumps over the lazy dog."` | +| `"*"` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | *N/A* | +| `"*"` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | `""` | +| `"*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | *N/A* | +| `""` | `"quick"` | `"*"` | `"quick brown fox jumps over the lazy dog."` | *N/A* | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `""` | `"*"` | `"brown"` | `"The quick brown"` | *N/A* | `"The quick "` | `"brown"` | +| `""` | `"*"` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | `"The quick brown fox jumps over the lazy dog."` | `""` | +| `""` | `"*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | `"The quick brown fox jumps over the lazy dog."` | *N/A* | +| `""` | `""` | `"*"` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | *N/A* | `"The quick brown fox jumps over the lazy dog."` | #### SearchOptions.Regex -These examples find the first occurrence in [Text][Text Property] with [Search Options][SearchOptions Property] set to `Regex` using a [case-sensitive, culture-insensitive][Ordinal] search. +These examples find the first occurrence in [Text][Text Property] with [Search Options][SearchOptions Property] set to `Regex`. | TextToFind.StartsWith | TextToFind.Contains | TextToFind.EndsWith | Match.Value | Match.Groups["startsWith"].Value | Match.Groups["contains"].Value | Match.Groups["endsWith"].Value | |------------|----------|----------|--------------|------------------|----------------|----------------| | `"The"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The"` | `"quick"` | `"brown"` | -| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | N/A | -| `"The"` | `""` | `"brown"` | No Match | No Match | N/A | No Match | -| `"The"` | `""` | `""` | `"The"` | `"The"` | N/A | N/A | -| `""` | `"quick"` | `"brown"` | `"quick brown"` | N/A | `"quick"` | `"brown"` | -| `""` | `"quick"` | `""` | `"quick"` | N/A | `"quick"` | N/A | -| `""` | `""` | `"brown"` | `"brown"` | N/A | N/A | `"brown"` | -| `""` | `""` | `""` | No Match | N/A | N/A | N/A | +| `"The"` | `"quick"` | `""` | `"The quick"` | `"The"` | `"quick"` | *N/A* | +| `"The"` | `""` | `"brown"` | *No Match* | *No Match* | *N/A* | *No Match* | +| `"The"` | `""` | `""` | `"The"` | `"The"` | *N/A* | *N/A* | +| `""` | `"quick"` | `"brown"` | `"quick brown"` | *N/A* | `"quick"` | `"brown"` | +| `""` | `"quick"` | `""` | `"quick"` | *N/A* | `"quick"` | *N/A* | +| `""` | `""` | `"brown"` | `"brown"` | *N/A* | *N/A* | `"brown"` | +| `""` | `""` | `""` | *No Match* | *N/A* | *N/A* | *N/A* | | `"The"` | `"quick"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `"quick"` | `" brown fox jumps over the lazy dog."` | | `"The"` | `".*"` | `"brown"` | `"The quick brown"` | `"The"` | `" quick "` | `"brown"` | | `"The"` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | `""` | -| `"The"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | N/A | -| `"The"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | N/A | `" quick brown fox jumps over the lazy dog."` | +| `"The"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | `" quick brown fox jumps over the lazy dog."` | *N/A* | +| `"The"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The"` | *N/A* | `" quick brown fox jumps over the lazy dog."` | | `".*"` | `"quick"` | `"brown"` | `"The quick brown"` | `"The "` | `"quick"` | `"brown"` | | `".*"` | `"quick"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The "` | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `".*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | N/A | +| `".*"` | `"quick"` | `""` | `"The quick"` | `"The "` | `"quick"` | *N/A* | | `".*"` | `".*"` | `"brown"` | `"The quick brown"` | `"The quick "` | `""` | `"brown"` | -| `".*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | N/A | `"brown"` | +| `".*"` | `""` | `"brown"` | `"The quick brown"` | `"The quick "` | *N/A* | `"brown"` | | `".*"` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | `""` | -| `".*"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | N/A | -| `".*"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | `""` | -| `".*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | -| `""` | `"quick"` | `".*"` | `"quick brown fox jumps over the lazy dog."` | N/A | `"quick"` | `" brown fox jumps over the lazy dog."` | -| `""` | `".*"` | `"brown"` | `"The quick brown"` | N/A | `"The quick "` | `"brown"` | -| `""` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | `""` | -| `""` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | N/A | `"The quick brown fox jumps over the lazy dog."` | N/A | -| `""` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | N/A | N/A | `"The quick brown fox jumps over the lazy dog."` | +| `".*"` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | `""` | *N/A* | +| `".*"` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | `""` | +| `".*"` | `""` | `""` | `"The quick brown fox jumps over the lazy dog."` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | *N/A* | +| `""` | `"quick"` | `".*"` | `"quick brown fox jumps over the lazy dog."` | *N/A* | `"quick"` | `" brown fox jumps over the lazy dog."` | +| `""` | `".*"` | `"brown"` | `"The quick brown"` | *N/A* | `"The quick "` | `"brown"` | +| `""` | `".*"` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | `"The quick brown fox jumps over the lazy dog."` | `""` | +| `""` | `".*"` | `""` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | `"The quick brown fox jumps over the lazy dog."` | *N/A* | +| `""` | `""` | `".*"` | `"The quick brown fox jumps over the lazy dog."` | *N/A* | *N/A* | `"The quick brown fox jumps over the lazy dog."` | ### Comparison Types @@ -443,15 +451,15 @@ For information about the [supported values][ComparisonTypes] for the [Compariso ### Null or empty Text -If [Text][Text Property] is `null` or empty (i.e. `""`) there is nothing to find in, so no operation is performed and [Match][Match Property] is set to `null`. +If [Text][Text Property] is `null` or empty (i.e. `""`) no operation is performed and [Match][Match Property] is set to `null`. ### Null or empty Text To Find -If all properties of [Text To Find][TextToFind Property] are `null` or empty (i.e. `""`) there is nothing to find, so no operation is performed, and [Match][Match Property] is set to `null`. +If all properties of [Text To Find][TextToFind Property] are `null` or empty (i.e. `""`) no operation is performed and [Match][Match Property] is set to `null`. ### Null or empty property of Text To Find -If a property of [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), then that section of the query is not considered for a valid match and is not included as a specific [Group][] in the returned [Match][]; see [Advanced Examples][]. +If a property of [Text To Find][TextToFind Property] is `null` or empty (i.e. `""`), then it is not included as a specified [Group][] in the returned [Match][Match Property]; see [Advanced Examples][]. ### Known Limitations