regex_matches unintuitive
Options
Connor McCormick
Member ✭
What am I supposed to put in Subject? Where do I put the regex?
[image.png]
[image.png]
Comments
-
Check out our docs for an example
the subject is the text subject you are searching through with your regular expression
https://docs.xano.com/working-with-data/data-type-filters/text-filter#regex_matches -
You should know that searching regex in the documentation returns nothing:
[image.png] -
This regex does not seem to work:
.*\..{3,4}$
Even though it works in testers:
[image.png][image.png][image.png]
What regex flavor do you use?
See this function: https://x0n1-tbv3-v8eo.n7.xano.io/admin/workspace/1/function/31 -
Wait...Why isn't this working?
text input was:
pedagogy.pdf
[image.png][image.png]
https://x0n1-tbv3-v8eo.n7.xano.io/admin/workspace/1/function/31 -
Matching everything isn't even working:
[image.png] -
Regex requires delimiters to set boundaries of your regular expression. Typically, these are /
So in your most recent example, you would write
/.*/
You can read more on how to use regex in the documentation link from above where delimiters and examples of special characters are shown -
This is the sort of thing that might be useful to include in the filter itself.
Also, would you be willing to check out whether it's possible to make the search term "regex" show up when searching the documentation? -
I'm also having a problem with regex expressions; are all standard inputs coded into Xano?
I am attempting to remove all strings from a list that are less than 3 characters long by using regex to find the lines, replacing them with a blank and then removing the blanks.
The regex commands with + seem to work as intended, but I can't get the regex commands using {from, to} to work at all.
This command /\w{1,3}/ should find all the strings that are between 1 and 3 characters long. Instead is finding anything with a A-Z,a-z,0-9 of a length greater than 1 inserting a blank.
Each of these return the same result in my text list.
/\w{1,2}/
/\w{1,3}/
/\w{1,4}/
/\w{1,5}/
The resulting list only contains special characters.
[image.png] -
The problem was behind the keyboard; this worked exactly as designed, just not as I intended.
For my purposes, I needed to add this: /\A.{1,3}\Z/
It removes any character between 1 and 3 characters long between the beginning (A) and end (Z) of the list item.
This resource was particularly helpful.
https://www.rexegg.com/regex-quickstart.html -
- we've contacted GitLab support on the issue, thanks for letting us know!
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