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.

GetStyledWords ( text ; style )

Featured Replies

Name & Parameters: [color:red][big] GetStyledWords ( text ; style ) [/big]

Description: GetStyledWords custom function

revision 1: now finds plain text, too.

Author: Daniele Raybaudi

Format: GetStyledWords ( text ; style )

Parameters:

text - the given text where there are some styled words

style - the style to search for ; if it is empty the function will search for "plain"

Returns all the styled words ( in list view ) within the given text

Sample Input:

I'm going to learn English

GetStyledWords ( text ; "" )

Results:

I'm

to

learn

Sample Input:

I'm going to learn English

GetStyledWords ( text ; "bold" )

Results:

going

English

Recursive: yes

Formula:

/*

GetStyledWords custom function



revision 1: now finds plain text, too.



Author: Daniele Raybaudi



Format: GetStyledWords ( text ; style )



Parameters:

text - the given text where there are some styled words

style - the style to search for ; if it is empty the function will search for "plain"



Returns all the  styled words ( in list view ) within the given text



Example 1)

text = I'm going ( bold ) to learn English ( bold )

GetStyledWords ( text ; "bold" ) returns:

going

English



Example 2)

text = I'm going ( bold ) to learn English ( bold )

GetStyledWords ( text ; "" ) or GetStyledWords ( text ; "plain" ) returns:

I'm

to

learn



*/

Let ( [

style = If ( IsEmpty ( style ) or style = "plain" ; """" ; style ) ;

svg = GetAsSVG ( text ) ;

parseSVG = MiddleValues ( svg ; 2 ; PatternCount ( svg ; "Style#" ) ) ;

nextSVG = RightValues ( svg ; ValueCount ( svg ) - 2 ) ;

line = GetValue ( parseSVG ; 1 );

pos1 = GetAsNumber ( Middle ( line ; Position ( line ; "," ; 1 ; 1 ) + 1 ; Position ( line ; "," ; 1 ; 2 ) - Position ( line ; "," ; 1 ; 1 ) - 1  ) ) ;

pos2 = GetAsNumber ( Middle ( line ; Position ( line ; "," ; 1 ; 2 ) + 1 ; Position ( line ; "<" ; 1 ; 2 ) - Position ( line ; "," ; 1 ; 2 ) - 1  ) ) ;

string = Middle ( text ; pos1 ; pos2 - pos1 + 1 );

adjString = Substitute ( TrimAll ( Substitute ( Middle ( text ; pos1 ; pos2 - pos1 + 1 )  ; ¶ ; " " ) ; 1; 1 ) ; " " ; ¶ ) ;

next = Trim ( Middle ( text ; Length ( string ) + 1 ; Length ( text )  ) )

] ;

Case ( 

PatternCount ( nextSVG ; style ); 

Case(

PatternCount ( line ; style )  ; adjString & ¶ & GetStyledWords ( next ; style );

GetStyledWords ( next ; style )

);

Case(

PatternCount ( line ; style ); adjString ;

""

)

)

) 

Required Functions: None

Author(s): raybaudi

Date: 03/08/07

Credits:

Disclaimer:

FM Forums does not endorse or warrantee these files are fit for any particular purpose. Do not post or distribute files without written approval from the copyright owner. All files are deemed public domain unless otherwise indictated. Please backup every file that you intend to modify.

  • Author

Hi all friends

this is an example of use that custom: custom value lists from an unique field

GetStyledWords.zip

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.