Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowFabric Data Days Monthly is back. Join us on March 26th for two expert-led sessions on 1) Getting Started with Fabric IQ and 2) Mapping & Spacial Analytics in Fabric. Register now
Can Text.Contains be used to detect the existence of line feeds and carriage returns, e.g. TextContains([column1]."#(cr)#(lf)") ?
Thanks!
Solved! Go to Solution.
Hi @ebjim
Thanks for using Fabric Community.
You can use the below codes for acheiving the above requirement.
Text.Contains([column1], String.Characters({10, 13}))
This approach uses Text.Contains to check if the column contains any of the character codes for carriage return and line feed. String.Characters({10,13}) creates a string containing the character codes for line feed (10) and carriage return (13).
Text.Matches([column1], "\r|\n")
You can also use the Text. Matches function with a regular expression that matches both carriage returns and line feeds. This expression will return a list of matches for either a carriage return (\r) or a line feed (\n) in the text column. If there are any matches, it means the text contains at least one line break.
Hope this helps. Please let us know if you have any further questions.
Hi @ebjim
Thanks for using Fabric Community.
You can use the below codes for acheiving the above requirement.
Text.Contains([column1], String.Characters({10, 13}))
This approach uses Text.Contains to check if the column contains any of the character codes for carriage return and line feed. String.Characters({10,13}) creates a string containing the character codes for line feed (10) and carriage return (13).
Text.Matches([column1], "\r|\n")
You can also use the Text. Matches function with a regular expression that matches both carriage returns and line feeds. This expression will return a list of matches for either a carriage return (\r) or a line feed (\n) in the text column. If there are any matches, it means the text contains at least one line break.
Hope this helps. Please let us know if you have any further questions.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Fabric update to learn about new features.