<?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: REGEX HELP with White Spaces in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/REGEX-HELP-with-White-Spaces/m-p/280288#M54322</link>
    <description>&lt;P&gt;Excellent thank you for your time.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jul 2020 07:26:30 GMT</pubDate>
    <dc:creator>AlexS</dc:creator>
    <dc:date>2020-07-20T07:26:30Z</dc:date>
    <item>
      <title>REGEX HELP with White Spaces</title>
      <link>https://community.jmp.com/t5/Discussions/REGEX-HELP-with-White-Spaces/m-p/280012#M54281</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I can do what i want for regex in an editor but&amp;nbsp;I'm having trouble switching it over to use for JMP.&lt;/P&gt;&lt;P&gt;The following does what i need it do to in the editor&lt;/P&gt;&lt;P&gt;([E]|[e])[2]|(231)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i can't seem to get to work exactly like i need it to in JMP&amp;nbsp;i got as far as the below&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Regex( :TEXT, "(E2|e2|231\d?)", "\1" )&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;it will pick up E2 or e2 no problem but for 231 i need it to only extract when there is whitespace either side of it.&lt;/P&gt;&lt;P&gt;I have been looking through the community but can't find exactly what I need.&lt;/P&gt;&lt;P&gt;In an ideal world it will display all results in the column not just one?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm sure someone out there can tell me seconds how to do it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:16:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/REGEX-HELP-with-White-Spaces/m-p/280012#M54281</guid>
      <dc:creator>AlexS</dc:creator>
      <dc:date>2023-06-10T23:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX HELP with White Spaces</title>
      <link>https://community.jmp.com/t5/Discussions/REGEX-HELP-with-White-Spaces/m-p/280017#M54282</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/19544"&gt;@AlexS&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;\s is usually the symbol for white space or \sb. However, it will be easier to give your a response if you provide an example of one row of column :text and what you are trying to extract, Make something up if it is proprietary.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jul 2020 00:26:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/REGEX-HELP-with-White-Spaces/m-p/280017#M54282</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2020-07-19T00:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX HELP with White Spaces</title>
      <link>https://community.jmp.com/t5/Discussions/REGEX-HELP-with-White-Spaces/m-p/280044#M54287</link>
      <description>@gzmorgan()&lt;BR /&gt;&lt;BR /&gt;So example text would be&lt;BR /&gt;&lt;BR /&gt;Jsjsjjs 231 jdjdjdj 2377474742311&lt;BR /&gt;&lt;BR /&gt;I don’t want it from the second numeric sequence just when there is white space either side at the moment it would pick up 2311 when all I want is 231 if there is one&lt;BR /&gt;&lt;BR /&gt;Thank you</description>
      <pubDate>Sun, 19 Jul 2020 06:38:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/REGEX-HELP-with-White-Spaces/m-p/280044#M54287</guid>
      <dc:creator>AlexS</dc:creator>
      <dc:date>2020-07-19T06:38:28Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX HELP with White Spaces</title>
      <link>https://community.jmp.com/t5/Discussions/REGEX-HELP-with-White-Spaces/m-p/280093#M54299</link>
      <description>&lt;P&gt;This example shows the expression to get the second part of your target based on the example that you provided.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Regex(
	"Jsjsjjs 231 jdjdjdj 2377474742311",
	"\s(\d+)\s",
	"\1"
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 19 Jul 2020 12:26:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/REGEX-HELP-with-White-Spaces/m-p/280093#M54299</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2020-07-19T12:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX HELP with White Spaces</title>
      <link>https://community.jmp.com/t5/Discussions/REGEX-HELP-with-White-Spaces/m-p/280187#M54306</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/19544"&gt;@AlexS&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Mark,&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5358"&gt;@Mark_Bailey&lt;/a&gt;&amp;nbsp;, provided you with the pattern to find any number in the first pattern&amp;nbsp; "space + any number + space"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Maybe I misread your response but it seemed&amp;nbsp; to me you were looking for the specific sequence&amp;nbsp; space + 231 + space.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If yes, an alternative solution is to use the &lt;STRONG&gt;Contains()&lt;/STRONG&gt; function. The code is a little more readable. Note REGEX returns a string, so if you want the number you need the &lt;STRONG&gt;Num()&lt;/STRONG&gt; function. A table with both functions is attached to this post.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( Contains( :Text, " 231 " ),
	231
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 901px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/25466i3D73476FC4DF6FE0/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jul 2020 16:44:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/REGEX-HELP-with-White-Spaces/m-p/280187#M54306</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2020-07-19T16:44:43Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX HELP with White Spaces</title>
      <link>https://community.jmp.com/t5/Discussions/REGEX-HELP-with-White-Spaces/m-p/280231#M54309</link>
      <description>&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/70"&gt;@gzmorgan0&lt;/a&gt;,&lt;BR /&gt;,&lt;BR /&gt;&lt;BR /&gt;Both will be required in some form but specifically to this request I need it for ‘231’ so thanks to both of you.&lt;BR /&gt;&lt;BR /&gt;How would I get it to search for all 3 and then put it all in one column if it’s there? Is it just a case of creating multiple Regex along with concatenation of columns?&lt;BR /&gt;&lt;BR /&gt;So for example I am looking for E2 or e2 or 231 but it will return one of those only. What I’d like is for it to return everything it finds?&lt;BR /&gt;&lt;BR /&gt;Thank you for your direction and help</description>
      <pubDate>Sun, 19 Jul 2020 18:17:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/REGEX-HELP-with-White-Spaces/m-p/280231#M54309</guid>
      <dc:creator>AlexS</dc:creator>
      <dc:date>2020-07-19T18:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX HELP with White Spaces</title>
      <link>https://community.jmp.com/t5/Discussions/REGEX-HELP-with-White-Spaces/m-p/280238#M54310</link>
      <description>&lt;P&gt;Here is a formula that should work to get what you want.&amp;nbsp; The column you apply this to, needs to be a Character Column.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;If( Row() == 1,
	getValues = Function( {},
		returnVal = "";
		If( Contains( :Text, " 231 " ),
			returnVal = "321"
		);
		If( Contains( :Text, " e2 " ),
			If( returnVal != "",
				returnVal = returnVal || ", "
			);
			returnVal = returnVal || "e2";
		);
		If( Contains( :Text, " E2 " ),
			If( returnVal != "",
				returnVal = returnVal || ", "
			);
			returnVal = returnVal || "E2";
		);
		returnVal;
	)
);
theValue = getValues();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&amp;nbsp;&lt;/PRE&gt;</description>
      <pubDate>Sun, 19 Jul 2020 18:58:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/REGEX-HELP-with-White-Spaces/m-p/280238#M54310</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-07-19T18:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX HELP with White Spaces</title>
      <link>https://community.jmp.com/t5/Discussions/REGEX-HELP-with-White-Spaces/m-p/280288#M54322</link>
      <description>&lt;P&gt;Excellent thank you for your time.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2020 07:26:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/REGEX-HELP-with-White-Spaces/m-p/280288#M54322</guid>
      <dc:creator>AlexS</dc:creator>
      <dc:date>2020-07-20T07:26:30Z</dc:date>
    </item>
  </channel>
</rss>

