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.

Parsing "<"anything in between replaced"/>"

Featured Replies

Hi To All,

I am trying to parse some files into another format.

It would really help if I could use a replace function that would search for a start occurence and an end occurence that could be defined and then replace anything in between with defined text.

I found the following function

SubstituteRange ( text; beginString; endString; replaceString ) at the following url http://www.briandunning.com/cf/122 (ps thanks to brian for all his cool functions)

But cannot get it to work! Any help would be much appreciated

Thanks,

Lance

Works fine for me.

I also tested this one a few weeks ago, and it worked for me too.

Maybe you can attach a sample of the text that isn't working for you, and maybe we can see what is not working better..

Lee

  • Author

Hi Ender,

How did I know I was going to get that as a response! : )

I have cut and paste the function 3-4 times changed various bits. The best I can get is it removes the search start text and the search end text along with anything in between. No replace is happening.

Any thoughts would be much appreciated, I can't for the life of me see anything I am putting in wrong. : (

Thanks,

Lance

Ah, there is an error in that CF. I had just tried it with an empty replacement string so I didn't see it (it helps to know what you're having trouble with.)

This is the fix:

...

Case(

lenBegin > 0 and lenEnd > 0 and ptBegin > 0 and ptEnd > lenEnd;

modText & replaceString & SubstituteRange(remainText; beginString; endString; replaceString);

text))

  • Author

Hi Lee,

I am happy to post a file that has screen shots of what I am doing. It may give further info. I may be doing somthing really basic wrong.

Thanks,

Lance

Example.pdf

  • Author

Hey Ender,

Just testing now and seems to be working great!!

Thanks so much ; )

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.