Query filter - how to use regex
Table = places
Column = placename
I want to find all records where placename begins with the content of variable placeNameStr.
The 'regex matches' operator seems a good fit for this. However, the example below does not work. I also tried /^placeNameStr/
The example in the screenshot generates this error:
{"message":"mb_stripos(): Argument #1 ($haystack) must be of type string, array given"}
I would also need it to handle upper or lower case input - i.e. the user could enter 'bri', 'Bri', BRI' etc.
Any suggestions please?
Best Answers
-
The error you are having right is related to the wrong data type. Is places.placename an array?
-
Have you considered using fuzzy_search with wildcard matching?
-
No problem, happy to help
Answers
-
The column is Text.
-
From the UK
When are our American friends going to wake-up? I've been working for two hours already!
-
@Pawel Magdanski thanks for your response. got it working. Thanks a lot.
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback