Jump 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.

wildcards? scripts

Featured Replies

  • Newbies

I have a list of words that I need to manipulate in two different ways.

In order to do what I need, it seems that I need wildcards, but i can't use them inside formulae, because FM just reads the wildcard characters as what they are, not as wildcards, in this instance.

What I am trying to do is the following (where "?" is wildcard):P

  • IF (word ends with "e?") THEN (add "i" to end of word)
  • IF (word ends with "o?") THEN (add "u" to end of word)
  • IF (word ends with "a?") THEN (add "ı" end of word)
  • etc

For example: I want to change input "bet" to "beti" , but "bot" to "botu" , etc.

Without wildcards, this is impossibly tedious. Any suggestions?

-Zyakobu

As far as I can remember the ? as a wildcard represents one character. In that case does this work:

If [ Right ( yourFile::theWord; 2) = "e" ]

Set Field [ yourFile::theWord; yourFile::theWord & "i" ]

Else If [ Right ( yourFile::theWord; 2) = "o" ]

Set Field [ yourFile::theWord; yourFile::theWord & "u" ]

Else If [ Right ( yourFile::theWord; 2) = "a" ]

Sorry, can't get the post to retain the indentation,

Norman

Set Field [ yourFile::theWord; yourFile::theWord & "i" ]

End If

If [ Right ( yourFile::theWord; 2) = "e" ]

I am afraid the only time that condition is going to return true is when theWord itself is "e".

Zyakobu:

There are no wildcards in a calculation, but they are not needed. Since you only care about the character before last, you can address it directly, ignoring everything else:

Let ( [

pos = Length ( word ) - 1 ;

char = Middle ( word ; pos ; 1 ) ;

add = Case (

char = "e" ; "i" ;

char = "o" ; "u" ;

char = "a" ; "ı"

)

] ;

word & add

)

Create an account or sign in to comment

Important Information

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

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.