March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |
User | Count |
---|---|
3 | |
2 | |
2 | |
2 | |
1 |