# Issue with CONTAINS() string function in AQL **Category:** [AQL](https://discourse.openehr.org/c/aql/43) **Created:** 2024-09-23 08:50 UTC **Views:** 52 **Replies:** 0 **URL:** https://discourse.openehr.org/t/issue-with-contains-string-function-in-aql/5744 --- ## Post #1 by @sebastian.iancu I did not notice earlier but it looks like there is an issue with AQL ANTLR lexer around the `CONTAINS()` [string function](https://specifications.openehr.org/releases/QUERY/development/AQL.html#_contains), as it collides with `CONTAINS` operator. ``` functionCall : terminologyFunction | name=(STRING_FUNCTION_ID | NUMERIC_FUNCTION_ID | DATE_TIME_FUNCTION_ID | IDENTIFIER) SYM_LEFT_PAREN (terminal (SYM_COMMA terminal)*)? SYM_RIGHT_PAREN ; ... // functions STRING_FUNCTION_ID: LENGTH | CONTAINS | POSITION | SUBSTRING | CONCAT_WS | CONCAT ; NUMERIC_FUNCTION_ID: ABS | MOD | CEIL | FLOOR | ROUND ; DATE_TIME_FUNCTION_ID: NOW | CURRENT_DATE_TIME | CURRENT_DATE | CURRENT_TIMEZONE | CURRENT_TIME ; // string functions LENGTH: L E N G T H ; POSITION: P O S I T I O N ; SUBSTRING: S U B S T R I N G ; CONCAT: C O N C A T ; CONCAT_WS: C O N C A T '_' W S ; ``` If I am right about this issue (those with more ANTLR experience please correct me), then the solution that I propose would be rename the function as `CONTAINS_STRING()`. Reported as https://openehr.atlassian.net/browse/SPECQUERY-36. --- **Canonical:** https://discourse.openehr.org/t/issue-with-contains-string-function-in-aql/5744 **Original content:** https://discourse.openehr.org/t/issue-with-contains-string-function-in-aql/5744