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.

How to get rid a stray line feed characters

Featured Replies

I can't seem to find a way to get rid of these "¬" in my calculation. I've tried copying and pasting, and using the "¬" character, to no avail.

Does anyone know?

You should be able to substitute these out by using a capture one.

i.e., copy one of the line feed characters.

Either use the Replace in the Browse Mode Menu bar like this

Select the field with the line feed character in it.

Menu [color:blue]>> Records [color:blue]>> Replace Field Contents

In the edit box, select

"Replace with Calculated Result"

Substitute ( YourField; "¬" ; "")

or, the set field script step

Set Field [ YourField; Substitute ( YourField; "¬" ; "") ]

you can also leave the "Specified Target Field" blank, and just place your courser in the field to be changed.

HTH

Lee

  • Author

Hi, Lee--

I just ran the test, and I copied and pasted directly from your post. Here are my results:

Substitute ( test ; "¬" ; "" )

Screenshot_2009-10-18_at_2.02.01_PM.jpg

As you can see, there has been no change. I actually copied and pasted this text into BBEdit and viewed text invisibles and they are in fact "¬".

So I'm confused.

Your sample result looks like a hyphen or minus sign, not the character you mentioned?

  • Author

Hi, Lee--

It's where the cursor is. If you see, at both the top and the bottom, before and after the readable text, is a bunch of empty space. I copied this whole text into BBEdit, and viewed invisibles, and all the empty space are in fact "¬".

Select the character in BBEdit

Hit Command and E,

Find

and Replace with either a space if you need it, or nothing if you don't.

Lee

  • Author

Hi, Lee--

Perhaps I'm not understanding... I can't really do this in BBEdit. I just brought it in there to show me what the character was to then create a calc to deal with it. Obviously, with 5000 records, this needs to be done within FM, I believe.

The character is probably getting translated by OS and web mapping differences. Post a screen shot of the actual character you want to substitute.

I think there's some confusion here between what is "shown" to you, and what something really "is". BBEdit (and most text editors) use ASCII character 172 to show "returns" (which on a Mac are really ASCII character 13). It does this for 2 reasons: 1. You can't see a return character (other than a line end), as it is white space, and, 2. Character 172 ("¬") is rarely used as itself.

So what you see in BBEdit is just a regular return. Which, within a FileMaker calculation is represented by ¶ (pilcrow, Opt-7) which is actually ASCII character 182, but it is used within FileMaker calculations to show internal field line breaks (which are not really carriage returns, but that does no matter for this, I don't think).

Substitute ( your text; ¶; "")

Should remove line breaks within a field. You have some other whitespace text in there also, and maybe a tab? So you might want to use (requires FileMaker 10 for the Char() function):

Trim ( Substitute ( text; [¶; ""]; [Char(9); ""] ))

  • Author

2009-10-18_7.08.26_PM.jpg

This is a screenshot of the before and after of the text in question, as shot in BBEdit, with Show invisibles. The before is the text as copied from the original, the after, after the calc:

Trim ( Substitute ( text; [¶; ""]; [Char(9); ""] ))

has been applied. As you can see, the tab (or whatever that triangle is?) has been removed, by the line feeds are still there.

The source of this is a webpage downloaded as source. I've then imported the text of the page in, and am trying to extract the relevant bits of text I need.

Edited by Guest

The source of this is a webpage downloaded as source.

There are a bunch of CFs that I use for parsing sources.

See this recent thread for more on the subject.

Link

Lee

  • Author

It may be a bit a late for that. I've been coding the past week, and everything's done but this one niggling, dratted thing :

Edited by Guest

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.