topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Friday April 19, 2024, 5:43 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Request of New Modify Format/Case Method  (Read 4787 times)

deepskytraveler

  • Member
  • Joined in 2011
  • **
  • Posts: 23
    • View Profile
    • Donate to Member
Request of New Modify Format/Case Method
« on: October 15, 2011, 10:44 PM »
Would it be possible to add a new method for trimming? What I'm looking for is the ability to trim all text either preceding or following a designated string. Thanks for considering.

Mark

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,900
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Request of New Modify Format/Case Method
« Reply #1 on: October 15, 2011, 10:46 PM »
you should be able to do this from the search+replace tab using regular expressions.

but it still might be something worth adding since it seems like it might be a pretty common thing people want to do.

deepskytraveler

  • Member
  • Joined in 2011
  • **
  • Posts: 23
    • View Profile
    • Donate to Member
Re: Request of New Modify Format/Case Method
« Reply #2 on: October 15, 2011, 10:57 PM »
Can't figure out how to do it with search and replace. Here is what I'm trying to accomplish. I have multi-line text clips. I want to trash all text after the first \n.

Mark

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,900
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Request of New Modify Format/Case Method
« Reply #3 on: October 16, 2011, 05:50 AM »
I have multi-line text clips

thats the problem -- it looks like the current code is working in line-mode, operating at line boundries and not matching multi-line stuff.  i will make it an option. stay tuned.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,900
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Request of New Modify Format/Case Method
« Reply #4 on: October 18, 2011, 06:53 PM »
new options in latest alpha to deal with this scenario.

deepskytraveler

  • Member
  • Joined in 2011
  • **
  • Posts: 23
    • View Profile
    • Donate to Member
Re: Request of New Modify Format/Case Method
« Reply #5 on: October 18, 2011, 09:16 PM »
Thanks Mouser. Will check it out shortly.

Mark

deepskytraveler

  • Member
  • Joined in 2011
  • **
  • Posts: 23
    • View Profile
    • Donate to Member
Re: Request of New Modify Format/Case Method
« Reply #6 on: October 19, 2011, 09:53 PM »
Working though not as I expected. Here is an example with a typical clip that I'm capturing. Notice that the clip is multi-lined, separated by linebreak character "\n".

image002.jpg

It appears that the trimming is acting separately on each line within the clip.

In this example I specified stripping everything  after the character "N". The result I was expecting was for the resultant clip to be one character, the first "N". Instead you'll see it stripped everything after the "N" on the first line as well as the second line.  BTW it is also case sensitive.

[attach-2]

In this case I wanted to trim everything after the first line in the clip. However it doesn't appear that the trim function recognizes the character "\n".

image006.jpg

Perhaps I'd better off with a script to accomplish the trimming?

Mark

deepskytraveler

  • Member
  • Joined in 2011
  • **
  • Posts: 23
    • View Profile
    • Donate to Member
Re: Request of New Modify Format/Case Method
« Reply #7 on: October 19, 2011, 09:56 PM »
Messed up once again.  Ugh :(

This is the correct screen shot for the trim after "N" example.

image004.jpg