[ https://issues.apache.org/jira/browse/BEAM-7389?focusedWorklogId=293384&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-293384 ]
ASF GitHub Bot logged work on BEAM-7389: ---------------------------------------- Author: ASF GitHub Bot Created on: 12/Aug/19 21:09 Start Date: 12/Aug/19 21:09 Worklog Time Spent: 10m Work Description: davidcavazos commented on pull request #9262: [BEAM-7389] Add code examples for Regex page URL: https://github.com/apache/beam/pull/9262#discussion_r313128147 ########## File path: website/src/documentation/transforms/python/element-wise/regex.md ########## @@ -19,10 +19,151 @@ limitations under the License. --> # Regex + +<script type="text/javascript"> +localStorage.setItem('language', 'language-py') +</script> + Filters input string elements based on a regex. May also transform them based on the matching groups. ## Examples -See [BEAM-7389](https://issues.apache.org/jira/browse/BEAM-7389) for updates. -## Related transforms -* [Map]({{ site.baseurl }}/documentation/transforms/python/elementwise/map) applies a simple 1-to-1 mapping function over each element in the collection \ No newline at end of file +In the following examples, we create a pipeline with a `PCollection` of text strings. +Then, we use the `re` module to search, replace, and split through the text elements using +[regular expressions](https://docs.python.org/3/library/re.html). + +You can use tools to help you create and test your regular expressions such as +[regex101](https://regex101.com/), +make sure to specify the Python flavor at the left side bar. Review comment: Done ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 293384) Time Spent: 41h 10m (was: 41h) > Colab examples for element-wise transforms (Python) > --------------------------------------------------- > > Key: BEAM-7389 > URL: https://issues.apache.org/jira/browse/BEAM-7389 > Project: Beam > Issue Type: Improvement > Components: website > Reporter: Rose Nguyen > Assignee: David Cavazos > Priority: Minor > Time Spent: 41h 10m > Remaining Estimate: 0h > -- This message was sent by Atlassian JIRA (v7.6.14#76016)