I have an issue while parsing my Solr Queries that I pass on the querystring:
The values I end up having to work with look like this:
ed_deliveryMethod:Face to
Face,ed_location:Alexandria,VA,ed_delivery:Onsite
I need a regex that would parse a key value pair:
- ed_deliveryMethod:Face to Face
- ed_location:Alexandria,VA
- ed_delivery:Onsite
So I need a regex to parse
FacetName:FacetValue
I was doing a split by commas but the comma on the location is throwing things off.
The last comma is optional since there might be just one filter.
I did try a lot of things before asking this question but no success. I’m not good at regex as you can see.
((?<Facet>.+):(?<FacetValue>.+),)+
Try the following:
Maybe you need to adjust
\wto contain all allowed charactes of your keys.