Hi Makers
I have this outout from text aggregator
I need extract with regex the data show after metodo_pago: and moneda_pago: and monto_pagado:
and put it on a variable names
Metodo de pago:
Moneda de pago:
Monto pagado:
Thanks
Hi Makers
I have this outout from text aggregator
I need extract with regex the data show after metodo_pago: and moneda_pago: and monto_pagado:
and put it on a variable names
Metodo de pago:
Moneda de pago:
Monto pagado:
Thanks
Could you please copy the text in the output bundle here?
Format the text using three backticks ``` before and after, like this:
```
text goes here
```
is_vat_exempt: no
alg_cos_updated: yes
metodo_pago: Pago MĂłvil
moneda_pago: BolĂvares
monto_pagado: 4521
_wcpdf_invoice_settings: [Collection]
_wcpdf_invoice_display_date: order_date
_wcpdf_invoice_creation_trigger: document_data
_wcpdf_invoice_date: 1695951212
_wcpdf_invoice_date_formatted: 2023-09-29T00:33:32.000Z
_wcpdf_invoice_number: ADEC-87
_wcpdf_invoice_number_data: [Collection]
_additional_wooccm0:
_vicodemedia_add_field: EL PAGO
Welcome to the Make community!
You can use a Text Parser “Match Pattern” module with this regular expression pattern
metodo_pago: (?<metodo_de_pago>.+)\nmoneda_pago: (?<moneda_de_pago>.+)\nmonto_pagado: (?<monto_pagado>.+)
Output:
For more information, see Text Parser in the Make Help Center:
Match Pattern
The Match pattern module enables you to find and extract string elements matching a search pattern from a given text. The search pattern is a regular expression (aka regex or regexp), which is a sequence of characters in which each character is either a metacharacter, having a special meaning, or a regular character that has a literal meaning.
- The complete list of metacharacters can be found on the MDN web docs website.
- For a tutorial on how to create regular expressions, we recommend the RegexOne website.
- For an easy, quick regex generator, try the Regular Expressions generator.
- For experimenting with regular expressions, we recommend the regular expressions 101 website. Just make sure to tick the ECMAScript (JavaScript) FLAVOR in the left panel.
Hope this helps!
Thank you so much for your help