function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ChrisB760ChrisB760 

Is there a "Search" or "Find" method for locating line breaks?

I need a way to search for line breaks in a Text Area field, however I can't figure out how to accomplish this using a standard formula function.  FIND("\n",BillingStreet), FIND(\n,BillingStreet), FIND(BR(),BillingStreet), FIND("<br>",BillingStreet), and every other variation I can think of doesn't seem to work.

 

Does anyone know if I can search for line breaks using some kind of APEX method?

 

Any ideas or suggesions would be really appreciated.

sfdcsushilsfdcsushil

Hello,

 

In code you can use Apex Pattern and Matcher classes to accomplish this. Below link has some examples.

 

http://salesforcesource.blogspot.in/2010/01/utilizing-apex-pattern-and-matcher.html

 

 

 

 

sfdcfoxsfdcfox

As far as I'm aware, you can't find line breaks using just formulas. You'd have to resort to Apex Code.