-
Trouble with Regex pattern
I'm trying to use the following regex pattern to validate phone numbers: /+?\d{1,4}?[-.\s]?(?\d{1,3}?)?[-.\s]?\d{1,4}[-.\s]?\d{1,4}[-.\s]?\d{1,9}/g I works fine on https://regex101.com/ However, the regex_matches filter returns always false. The same problem here. No matter what the input is, returns "the phone number is…
-
Using Xano Pattern filter (Regex) doesn't give expected results
I've added a column with a Pattern filter, as such: The pattern is: `/\b(1[0-2]|0?[1-9]):[0-5][0-9] [AP][M]\b` Il also tried `\b(1[0-2]|0?[1-9]):[0-5][0-9] [AP][M]\b` But it doesn't work, I can write any kind of text in the column, it doesn't get rejected. Although, I've tested that regex at and it provides expected…
-
regex_replace usage
I am trying to mask the first 5 numbers in a string in an API response. There may be non-number characters in this string too. I figure using the regex_replace filter is the correct approach? But can't figure out how to apply it in the UI. Chat GPT tells me that this regex will work - (?<=\D|^)\d{5} - but there are two…
-
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:…
-
array filter to perform regex
Trying to filter array of objects to return a subset where a string property matches the regex. i am using a filter function on array and in the lambda I have the following but i am having problems getting Objects like RegExp or string methds like match to work var mystr = $this._tags.tag_name.matches; const re = /^[^\$]/…
-
How to extract a section of a URL?
I'm positive Xano has an easy(ish) way of doing this, but I just can't land my finger on it. I have a list of Amazon URL's that I'm needing to extract the ASIN values from. Luckily, in this list Amazon always has the ASIN following the /dp/ folder. See here: I'd like to avoid using regex as much as possible here, but with…