Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

MiddleWords ( (Substitute ( Sym ; "." ; ¶ )) ; 2 ; 1 )

Featured Replies

Hunting for Newbie Errors:

I'm importing data (tens of thousands of records) as a text string that looks something like this:

AaAa.4.100

I need this imported string divided into three fields (AaAa, 4, 100). There  are plenty of text tools to do this. In fact, it's simple, provided each part is a known and fixed length. However, the imported data, while in a fairly narrow range, is not fixed.

I need a more generalized approach.

I'm wondering about the MiddleWords function.  I understand what it does -- manipulates lists, which are normally delimited with a paragraph character. This function is exactly what I need if only it would accept "." rather than "paragraph" arguments.

So, I am doing a simple substitution:

MiddleWords ( (Substitute ( Sym ; "." ; ¶ )) ; 2 ; 1 ) -- substituting the paragraph character for the "." character that currently divides my data.

The data output appears fine, but with so many I can only spot check. Does anyone see a problem with this approach? I'm asking because all data goes through this substitution.

Suzie

Why are you using the MiddleWords Function?

Substitute ( Sym ;    [ "." ; ", " ]  )

I think the OP wants the make three new fields, not a string. 

For the original question converting the period to a list with substitute is correct. Using getvalue function is the simplest way the separate in their own fields. 

Edited by Aussie John

Hi Suzie,

GetValue ( Substitute (  Sym  ; [  "." ; "¶" ]  ); 1 )  // AaAa

GetValue ( Substitute ( Sym ; [  "." ; "¶" ]  ); 2 ) // 4

GetValue ( Substitute ( Sym  ; [  "." ; "¶" ]  ); 3 ) //100

HTH

Lee

Btw your middlewords approach should have worked even without the substitution. This does depend on the separator though. I’m not sure, but if the string is seen as a number field and you have periods then it may not see then as separate words. Happy to be corrected on that. 

Edited by Aussie John

There is still nothing wrong with.

Leftwords (sym ; 1 )

MiddleWords ( Sym ; 2 ; 1 )

RightWords ( sym : 1 )

if the pattern in sym is consistent with word, word, word,

On 12/22/2017 at 2:00 PM, suzieyoga said:

I'm wondering about the MiddleWords function.  I understand what it does -- manipulates lists, which are normally delimited with a paragraph character. This function is exactly what I need if only it would accept "." rather than "paragraph" arguments.

MiddleWords is not restricted to paragraph delimiters. You may be thinking of MiddleValues. So if the data has a consistent separator, you don't need to do any substitution, you can simply parse it out as in Lee's last post.

Handy reference: Word Separators

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.