Author Topic: Line break in a code replacement text  (Read 5165 times)

Offline vivial6

  • Newcomer
  • *
  • Posts: 2
    • View Profile
Line break in a code replacement text
« on: June 07, 2013, 09:18:35 AM »
Is it possible today or in the future to have a line break (CR/LF) within a Code replacement text? Some character that represent a tap on the return key?

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Line break in a code replacement text
« Reply #1 on: June 07, 2013, 09:29:46 AM »
Is it possible today or in the future to have a line break (CR/LF) within a Code replacement text? Some character that represent a tap on the return key?

Can you tell me why you would need to insert a hard return in your text?  Please furnish an example or two.

-Kirk

Offline devenh

  • Sr. Member
  • ****
  • Posts: 435
    • View Profile
Re: Line break in a code replacement text
« Reply #2 on: June 09, 2013, 07:56:36 PM »
This has been on my wish list for years  :)

http://forums.camerabits.com/index.php?topic=5388.msg24629#msg24629

Example?  Let's say the Headline contains this text:

abc
def

and you want to search for CR/LF and replace it with a space to get:

abc def

or perhaps visa versa.

I'd also through in the ability to search and replace the tab character too.

Deven

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Re: Line break in a code replacement text
« Reply #3 on: June 09, 2013, 09:05:52 PM »
Deven,

The original poster was asking about Code Replacement.  Not Find & Replace.

Try putting {nl} in your Replacement text.  Code Replacement works with variables and the {nl} variable evaluates to a new line.  {tab} evaluates to a tab character.

HTH,

-Kirk

Offline devenh

  • Sr. Member
  • ****
  • Posts: 435
    • View Profile
Re: Line break in a code replacement text
« Reply #4 on: June 10, 2013, 07:51:20 AM »
Oops, gotta little carried away with the search/replace thing  ;)