<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Keep text between // and / in Power Query</title>
    <link>https://community.fabric.microsoft.com/t5/Power-Query/Keep-text-between-and/m-p/916092#M31442</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="195113" data-lia-user-login="daniegajohnson" class="lia-mention lia-mention-user"&gt;daniegajohnson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then we can add 2 if-statements to check wheter the string is found or not&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;let
    Quelle = "android-app://com.google.android.googlequicksearchbox",
    Pos1 = Text.PositionOf(Quelle, "//"),
    DeleteFirstPart = if Pos1 = -1 then Quelle else Text.End(Quelle,Text.Length(Quelle)-Pos1-2),
    Pos2 = Text.PositionOf(DeleteFirstPart,"/"),
    DeleteLastPart = if Pos2 = -1 then DeleteFirstPart else Text.Start(DeleteFirstPart,Pos2)
in
    DeleteLastPart&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Copy paste this code to the advanced editor in a new blank query to see how the solution works. If this solution fits your need, copy and past a part of it and implement it in your query&lt;BR /&gt;&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt; or &lt;STRONG&gt;solves &lt;/STRONG&gt;your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)&lt;BR /&gt;Kudoes are nice too&lt;BR /&gt;&lt;BR /&gt;Have fun&lt;BR /&gt;&lt;BR /&gt;Jimmy&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jan 2020 07:40:40 GMT</pubDate>
    <dc:creator>Jimmy801</dc:creator>
    <dc:date>2020-01-30T07:40:40Z</dc:date>
    <item>
      <title>Keep text between // and /</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Keep-text-between-and/m-p/915555#M31418</link>
      <description>&lt;P&gt;I have this as my entry:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Referrer: &lt;A href="https://junebugweddings.com/wedding-blog/tropical-chic-garden-wedding-at-the-vanderbilt-museum/" target="_blank"&gt;https://junebugweddings.com/wedding-blog/tropical-chic-garden-wedding-at-the-vanderbilt-museum/&lt;/A&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;I would like to keep just what's between // and the first /, so in this case the output desired would be junebugweddings.com&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 20:21:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Keep-text-between-and/m-p/915555#M31418</guid>
      <dc:creator>daniegajohnson</dc:creator>
      <dc:date>2020-01-29T20:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Keep text between // and /</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Keep-text-between-and/m-p/915572#M31420</link>
      <description>&lt;P&gt;Hello &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="195113" data-lia-user-login="daniegajohnson" class="lia-mention lia-mention-user"&gt;daniegajohnson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;check out this solution. you can apply Text.PositionOf to identify the position of // and / and then cut the string twice.&lt;/P&gt;&lt;P&gt;Here the complete solution&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Quelle = "https://junebugweddings.com/wedding-blog/tropical-chic-garden-wedding-at-the-vanderbilt-museum/",
    Pos1 = Text.PositionOf(Quelle, "//"),
    DeleteFirstPart = Text.End(Quelle,Text.Length(Quelle)-Pos1-2),
    Pos2 = Text.PositionOf(DeleteFirstPart,"/"),
    DeleteLastPart = Text.Start(DeleteFirstPart,Pos2)
in
    DeleteLastPart&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Copy paste this code to the advanced editor in a new blank query to see how the solution works. If this solution fits your need, copy and past a part of it and implement it in your query&lt;BR /&gt;&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt; or &lt;STRONG&gt;solves &lt;/STRONG&gt;your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)&lt;BR /&gt;Kudoes are nice too&lt;BR /&gt;&lt;BR /&gt;Have fun&lt;BR /&gt;&lt;BR /&gt;Jimmy&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 20:36:16 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Keep-text-between-and/m-p/915572#M31420</guid>
      <dc:creator>Jimmy801</dc:creator>
      <dc:date>2020-01-29T20:36:16Z</dc:date>
    </item>
    <item>
      <title>Re: Keep text between // and /</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Keep-text-between-and/m-p/915606#M31423</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="160408" data-lia-user-login="Jimmy801" class="lia-mention lia-mention-user"&gt;Jimmy801&lt;/a&gt;thanks! That worked for the scenario I described. As I looked through the data I was getting errors because not all the entries in that referral column are alike. For example, "Referrer:" (when the visitor comes from an internal page and there's no data after the word refferrer) or "Referrer: android-app://com.google.android.googlequicksearchbox" (no single /).&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 21:08:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Keep-text-between-and/m-p/915606#M31423</guid>
      <dc:creator>daniegajohnson</dc:creator>
      <dc:date>2020-01-29T21:08:57Z</dc:date>
    </item>
    <item>
      <title>Re: Keep text between // and /</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Keep-text-between-and/m-p/916054#M31440</link>
      <description>&lt;P&gt;Hi &amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="195113" data-lia-user-login="daniegajohnson" class="lia-mention lia-mention-user"&gt;daniegajohnson&lt;/a&gt; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We can create a custom column to meet your requirement:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let d1 = Text.PositionOf([Referrer],"//"),
    d2 = Text.PositionOf(Text.End([Referrer],d1),"/")
in
Text.Range([Referrer],d1+2,if d2=-1 then Text.Length([Referrer])-d1-2 else d2)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All the queries are here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("NY09EoIhDETvQm2g9yrMVwTIQBQI8qMeXwos3+y+XWsV1tCFA2Brd2O8FB1FYiZ9goOvxf45CLtPTr7qulmV5mxjO49Vya34oRC4xqH3hjkALks0s0tjjxl8Yg8Re6AK/wZOmIngve+oO84Tyhq0ilHX9QM=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Referrer = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Referrer", type text}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each let d1 = Text.PositionOf([Referrer],"//"),
    d2 = Text.PositionOf(Text.End([Referrer],d1),"/")
in
Text.Range([Referrer],d1+2,if d2=-1 then Text.Length([Referrer])-d1-2 else d2))
in
    #"Added Custom"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 06:58:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Keep-text-between-and/m-p/916054#M31440</guid>
      <dc:creator>v-lid-msft</dc:creator>
      <dc:date>2020-01-30T06:58:20Z</dc:date>
    </item>
    <item>
      <title>Re: Keep text between // and /</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Keep-text-between-and/m-p/916092#M31442</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="195113" data-lia-user-login="daniegajohnson" class="lia-mention lia-mention-user"&gt;daniegajohnson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;then we can add 2 if-statements to check wheter the string is found or not&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;let
    Quelle = "android-app://com.google.android.googlequicksearchbox",
    Pos1 = Text.PositionOf(Quelle, "//"),
    DeleteFirstPart = if Pos1 = -1 then Quelle else Text.End(Quelle,Text.Length(Quelle)-Pos1-2),
    Pos2 = Text.PositionOf(DeleteFirstPart,"/"),
    DeleteLastPart = if Pos2 = -1 then DeleteFirstPart else Text.Start(DeleteFirstPart,Pos2)
in
    DeleteLastPart&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Copy paste this code to the advanced editor in a new blank query to see how the solution works. If this solution fits your need, copy and past a part of it and implement it in your query&lt;BR /&gt;&lt;BR /&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt; or &lt;STRONG&gt;solves &lt;/STRONG&gt;your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)&lt;BR /&gt;Kudoes are nice too&lt;BR /&gt;&lt;BR /&gt;Have fun&lt;BR /&gt;&lt;BR /&gt;Jimmy&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 07:40:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Keep-text-between-and/m-p/916092#M31442</guid>
      <dc:creator>Jimmy801</dc:creator>
      <dc:date>2020-01-30T07:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Keep text between // and /</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Keep-text-between-and/m-p/916392#M31459</link>
      <description>&lt;P&gt;Try Text.BetweenDelimiters&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Line= "Referrer: android-app://com.google.android.googlequicksearchbox",
    Between= Text.BetweenDelimiters(Line,"//","/")
in
    Between&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 11:42:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Keep-text-between-and/m-p/916392#M31459</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-01-30T11:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: Keep text between // and /</title>
      <link>https://community.fabric.microsoft.com/t5/Power-Query/Keep-text-between-and/m-p/929510#M32022</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="195113" data-lia-user-login="daniegajohnson" class="lia-mention lia-mention-user"&gt;daniegajohnson&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 06:24:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Power-Query/Keep-text-between-and/m-p/929510#M32022</guid>
      <dc:creator>v-lid-msft</dc:creator>
      <dc:date>2020-02-12T06:24:49Z</dc:date>
    </item>
  </channel>
</rss>

