C
C#2y ago
Owen

❔ Regex assistance

Looking for some assistance with regex - details posted in #other-langs For context, i'm pulling orders from an API and am looking to use Regex to return the amount of orders - aswell as the amount of orders after a certain date
8 Replies
Owen
OwenOP2y ago
I am using it to display information on my Streamdeck. The plugin I use only allows JSON values to be returned by their name - there is no further parsing support except for regex
Owen
OwenOP2y ago
There is indeed - just minimal.
Owen
OwenOP2y ago
I'll send the sample JSON now
Owen
OwenOP2y ago
https://developers.sellix.io/#orders
{
"data":
{
"orders":
[
"0":
{
"bill_info":
null,
"cashapp_cashtag":
null,
"cashapp_note":
null,
"cashapp_qrcode":
null,
"cloudflare_image_id":
"sample-c4f1-4f7c-9a1d-89120ed0c800",
"country":
"IT",
"coupon_id":
null,
"created_at":
162857125819,
"crypto_address":
"3RUx8gs74R5KdXrs8wU6Z2xQkS8jmGVCnTVTRpwSoE3B",
"crypto_amount":
0.014174,
"crypto_confirmations_needed":
1,
"crypto_exchange_rate":
176.38,
"crypto_payout":
true,
"crypto_payout_transaction":
{ },
"crypto_received":
0.014174,
"crypto_scheduled_payout":
false,
"crypto_transactions":
[ ],
"crypto_uri":
"solana:3RUx8gs74R5KdXrs8wU6Z2xQkS8jmGVCnTVTRpwSoE3B?amount=0.014174",
"currency":
"EUR",
"custom_fields":
{ },
"customer_email":
"day":
"Wed",
"day_value":
29,
"developer_invoice":
false,
"developer_return_url":
null,
"developer_title":
null,
"developer_webhook":
null,
"discount":
0,
"dynamic_response":
null,
"exchange_rate":
1.12,
"fee_billed":
true,
"fee_percentage":
5,
"file":
{ },
"gateway":
"SOLANA",
"gateways_available":
[ ],
"id":
0,
"ip":
"255.11.12.255",
"ip_info":
{ },
"is_vpn_or_proxy":
false,
"lex_order_id":
null,
"lex_payment_method":
null,
"location":
"Bologna, Emilia-Romagna (Europe/Rome)",
"month":
"Dec",
"name":
"Sellix",
"paydash_paymentID":
null,
"paypal_apm":
null,
"paypal_dispute":
{ },
"paypal_email":
null,
"paypal_email_delivery":
false,
"paypal_fee":
null,
"paypal_order_id":
null,
"paypal_payer_email":
null,
"paypal_subscription_id":
null,
"paypal_subscription_link":
null,
"perfectmoney_id":
null,
"product":
{ },
"product_id":
"sample2bde8a50",
"product_title":
"Digital Good",
"product_type":
"SERIALS",
"product_variants":
{ },
"quantity":
5,
"recurring_billing_id":
null,
"serials":
[ ],
"service_text":
null,
"shop_force_paypal_email_delivery":
true,
"shop_id":
0,
"shop_image_name":
null,
"shop_image_storage":
null,
"shop_paypal_credit_card":
true,
"skrill_email":
null,
"skrill_link":
null,
"skrill_sid":
null,
"status":
"COMPLETED",
"status_details":
null,
"status_history":
[ ],
"stripe_client_secret":
null,
"stripe_price_id":
null,
"subscription_id":
null,
"subscription_time":
null,
"subtype":
null,
"total":
2.5,
"total_display":
2,
"type":
"PRODUCT",
"uniqid":
"sample-3ddfc9dc3d-ab2e36",
"updated_at":
162857125819,
"updated_by":
0,
"user_agent":
"PostmanRuntime/7.26.8",
"void_details":
null,
"webhooks":
[ ],
"year":
2021
}
]
},
"env":
"production",
"error":
null,
"log":
null,
"message":
null,
"status":
200
}
{
"data":
{
"orders":
[
"0":
{
"bill_info":
null,
"cashapp_cashtag":
null,
"cashapp_note":
null,
"cashapp_qrcode":
null,
"cloudflare_image_id":
"sample-c4f1-4f7c-9a1d-89120ed0c800",
"country":
"IT",
"coupon_id":
null,
"created_at":
162857125819,
"crypto_address":
"3RUx8gs74R5KdXrs8wU6Z2xQkS8jmGVCnTVTRpwSoE3B",
"crypto_amount":
0.014174,
"crypto_confirmations_needed":
1,
"crypto_exchange_rate":
176.38,
"crypto_payout":
true,
"crypto_payout_transaction":
{ },
"crypto_received":
0.014174,
"crypto_scheduled_payout":
false,
"crypto_transactions":
[ ],
"crypto_uri":
"solana:3RUx8gs74R5KdXrs8wU6Z2xQkS8jmGVCnTVTRpwSoE3B?amount=0.014174",
"currency":
"EUR",
"custom_fields":
{ },
"customer_email":
"day":
"Wed",
"day_value":
29,
"developer_invoice":
false,
"developer_return_url":
null,
"developer_title":
null,
"developer_webhook":
null,
"discount":
0,
"dynamic_response":
null,
"exchange_rate":
1.12,
"fee_billed":
true,
"fee_percentage":
5,
"file":
{ },
"gateway":
"SOLANA",
"gateways_available":
[ ],
"id":
0,
"ip":
"255.11.12.255",
"ip_info":
{ },
"is_vpn_or_proxy":
false,
"lex_order_id":
null,
"lex_payment_method":
null,
"location":
"Bologna, Emilia-Romagna (Europe/Rome)",
"month":
"Dec",
"name":
"Sellix",
"paydash_paymentID":
null,
"paypal_apm":
null,
"paypal_dispute":
{ },
"paypal_email":
null,
"paypal_email_delivery":
false,
"paypal_fee":
null,
"paypal_order_id":
null,
"paypal_payer_email":
null,
"paypal_subscription_id":
null,
"paypal_subscription_link":
null,
"perfectmoney_id":
null,
"product":
{ },
"product_id":
"sample2bde8a50",
"product_title":
"Digital Good",
"product_type":
"SERIALS",
"product_variants":
{ },
"quantity":
5,
"recurring_billing_id":
null,
"serials":
[ ],
"service_text":
null,
"shop_force_paypal_email_delivery":
true,
"shop_id":
0,
"shop_image_name":
null,
"shop_image_storage":
null,
"shop_paypal_credit_card":
true,
"skrill_email":
null,
"skrill_link":
null,
"skrill_sid":
null,
"status":
"COMPLETED",
"status_details":
null,
"status_history":
[ ],
"stripe_client_secret":
null,
"stripe_price_id":
null,
"subscription_id":
null,
"subscription_time":
null,
"subtype":
null,
"total":
2.5,
"total_display":
2,
"type":
"PRODUCT",
"uniqid":
"sample-3ddfc9dc3d-ab2e36",
"updated_at":
162857125819,
"updated_by":
0,
"user_agent":
"PostmanRuntime/7.26.8",
"void_details":
null,
"webhooks":
[ ],
"year":
2021
}
]
},
"env":
"production",
"error":
null,
"log":
null,
"message":
null,
"status":
200
}
Here's the sample
sellix.io
Sellix Developers: Build, transform, and power your business
Tap into our vast network of services and transform your digital experiences. Grow your business with payments, ecommerce, and support to leveraging the most mission-critical, innovative business technologies of today.
Owen
OwenOP2y ago
I don't believe so. Just after the total count of order objects and another total count of order object after x date
Owen
OwenOP2y ago
You can find the date here
Owen
OwenOP2y ago
Ideally i'd like to do this purely with regex, to save external programs Darn, unfortunate Yeah I figured it wasn't the best, wasn't sure if it was impossible or not. If C# could be used here it would be a lot simpler.
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server