Skip to Content Skip to Menu

Searching in lists with regex?

  • mapache64
  • mapache64
  • OFFLINE
  • Posts: 42
  • Thanks: 3
  • Karma: 0
12 years 3 months ago #203502 by mapache64
Searching in lists with regex? was created by mapache64
Hi, I have some lists of persons and want to search e.g. in an area of the zip-code like show me the zips from 79*** or show me 79000...80000. Is this possible? And when, how?

Thanks al lot for all help.
greetings
Mapache

The Test-site here: ae.die-marketingmacher.de/ then go to "Mitglieder" > "Mitglieder-Suche"

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
12 years 3 months ago #203537 by krileon
Replied by krileon on topic Re: Searching in lists with regex?
If it's an integer field then it'll already allow you to search between 2 values. Text fields can't do between values searching. There's no regex searching however, sorry.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • mapache64
  • mapache64
  • OFFLINE
  • Posts: 42
  • Thanks: 3
  • Karma: 0
12 years 3 months ago #204016 by mapache64
Replied by mapache64 on topic Re: Searching in lists with regex?
Hi krileon,

thanks for your tip. You are right, the zip-field was only text now i changed to integer.

But now I have a new problem because in Germany we have zip-Codes like "09132" with a Zero at the beginning. So i switch the integer to "unsigned zerofill". O.k. this part works. But now there a people from Switzerland with only 4digit-zipcodes. They have now already a "0" in front.

Any Idea how the go one??

greetings
Mapache

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
12 years 3 months ago #204053 by krileon
Replied by krileon on topic Re: Searching in lists with regex?
You can't have leading zeros for an integer field unfortunately. If you assume everyone is going to have a leading zero you could use a delimiter field to display the field instead of letting it display normally (e.g. 0[cb_zip]).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • mapache64
  • mapache64
  • OFFLINE
  • Posts: 42
  • Thanks: 3
  • Karma: 0
12 years 3 months ago #204065 by mapache64
Replied by mapache64 on topic Re: Searching in lists with regex?
Thanks krileon,

I know this part, for that I use "unsigned zerofill" and the field is limited to 5 digits. It is working for Germany, other country now I will make a little workaround. not perfect but we only have 30 Personsoutside.


The task at least is to make it possible to search zip-code in a range. Perhaps you know a quite other solution?

If not, we can close this thread.

Thanks and a good day
Mapache

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
12 years 3 months ago #204095 by krileon
Replied by krileon on topic Re: Searching in lists with regex?
Not aware of any other solution except creating a new fieldtype plugin specific to zipcode usage as PHP functions used to sanitize integer fields will remove leading zeros all the time.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum