I'm trying to filter features in a QGIS layer to those with the following in their "description" attribute.



I think what I need is something like this, with the appropriate escape sequences replacing LINEBREAK,LINEBREAK:

"description" LIKE '%CC_W</td>LINEBREAK,LINEBREAK<td>3%'

I've tried \r and \n to no avail. Both of them generate no filter hits even when I search them alone over my feature set, which definitely does have line breaks in the "description" attributes.

"description" LIKE '%\r%' 0 hits

"description" LIKE '%\n%' 0 hits

  • Tilde doesn't work. "description" LIKE '%~%' 0 hits. – Kenji Yamada Sep 8 at 19:49
  • I got a parse error for that. "description" ~ '%\n%' – Kenji Yamada Sep 8 at 20:09
  • txt LIKE '%\n%' works for me, after copy-pasting the sample data from the question – JGH Sep 8 at 20:28

Try this expression "description" ~ '\n'


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.