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.

Grabbing an entire line of text from a paragraph

Featured Replies

Hi

I have a question about grabbing a particular line in a paragraph?

I would like to know how to grab or parse Line 7 in a text paragraph..

 

I pledge alligiance

to the flag

of the

United States of America

and to the

republic in which it stands

one Nation under God

indivisible with

Liberty and Justice

for All

 

 

I would like to get the line 7 "one nation under God" into my field "line 7"

I would like to get the line 4  "United States of America" into my field "line 4"

 

How can this be done?

Thanks

Try using:

 

GetValue ( text ; 7 )

What LaRetta said. Note that technically, a line ending with a carriage return is a paragraph all by itself.

>

 

Assume three fields:

Paragraph = eqauls the text to search

GrabRow = The row you want to retrieve

RowGrabText = a calculated result

 

You can use the formula: Middle (Paragraph ; Position ( Paragraph ; ¶ ; 1 ;GrapRow-1 )+1 ;  Position ( Paragraph ; ¶ ; 1 ;GrapRow ) - Position ( Paragraph ; ¶ ; 1 ;GrapRow-1 )-1 )

 

The formula uses the "Position" function to find paragraph returns (i.e. "¶").  when you enter "4" as the row to return it finds the position of the 3rd and 4th paragraph marker locations.  By taking the difference between the two you have the starting point and number of characters for the "Middle" function.  You will notice the "+1" and "-1" entries, these trim off the leading and trailing "¶'s" so that only the text is returned without a leading or trailing blank line.

 

 

*****************************************

 

No sure what you want to use it for, but this will return all text between the markers not just the line you may be seeing.  What I mean by that is that if you have a 5-sentence paragraph that word wraps in your box, it will pull all 5-sentences between the markers - not just the line you see in the text box.  It works for your example because each "line of text" ends in the paragraph marker.

 

 

>>>>


>

 

Well, that's embarrassing.  :idot:

 

>>>>

  • Author

Thanks everyone. Happy New Year

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.