INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Search and replace for a character and replace with a hard carriage return  (Read 112 times)

mvandyke

  • World Citizen
  • ***
  • Posts: 165

I have a large text field that would look a lot better if I could search for a character (ex. •) and replace with a hard carriage return using FIND AND REPLACE in JRiver.  This way each variable would be on it's own line:

 Current:
1987/Cassette - Columbia(JCT-33795) [Born to Run] •  1987/CD - Columbia(33795) [Born to Run] •  1989/Cassette - Columbia(6865813T) [Born to Run] •  1990/CD - Legacy / Sony Music Distribution(52859 CK) [Born to Run] •  1992/Mini-Disc - Columbia(33795) [Born to Run] •  1994/CD - Legacy / Master Sound(64406) [Born to Run] •  2000/CD - Sony Music Distribution(CD 80959) [Born to Run]

Would like:
•  1987/Cassette - Columbia(JCT-33795) [Born to Run]
•  1987/CD - Columbia(33795) [Born to Run]
•  1989/Cassette - Columbia(6865813T) [Born to Run]
•  1990/CD - Legacy / Sony Music Distribution(52859 CK) [Born to Run]
•  1992/Mini-Disc - Columbia(33795) [Born to Run]
•  1994/CD - Legacy / Master Sound(64406) [Born to Run]
•  2000/CD - Sony Music Distribution(CD 80959) [Born to Run]

I've tried some special characters but no luck.

Any help would be appreciated

Thanks
Matt
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2103

I dont think find and replace support extended chars or regex. One solution would be to make new calculated field e.g. "Your Large Field (pretty)" which will format your raw field as you like

expression for new field e.g.
Code: [Select]
Replace(•  [Your Large Field],/ •,<br>•)
Or if you are confident enough you could replace your original field content with something like this
Code: [Select]
=Replace(•  [this],/ •,<br>•)
Creating new formatted field (first suggestion) would be safer as your original data is still there in case you mess up something with expressions
Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3192

There is a expression to insert an ASCII character  although there may be limitations on where you can use it.  You might try CHAR(10) and see is that puts in a line feed. Use 13 for a carriage return. I do know know if that will work in a Find and Replace. But, worth a try unless someone has more details.

From the Wiki

Description   Char(Numeric Number Code)
                        Char() has unicode support, however, only decimal values are supported. If you require a Hex to Decimal convertor, try unicode-search.net, or search for an alternative online.
Logged

zybex

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3016

Yes, char(10) should work:
Code: [Select]
=replace(• [this],•/ / , char(10)•/ )
It's possible to do a more flexible replace with Regex mode -2, but I think it's overkill.
Logged

lepa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2103

Looks like Find & Replace tool accepts char() function also. Didn't know that it eats expressions also
Logged

mvandyke

  • World Citizen
  • ***
  • Posts: 165

The search and replace worked just fine with the Char(10).  Thanks for all of your expertise!
Logged
Pages: [1]   Go Up