RMLio / yarrrml-parser

A YARRRML parser library and CLI in Javascript
MIT License
41 stars 17 forks source link

How to use regular expression as parameters for a function (like grel:string_replace) ? #180

Open darreal44 opened 1 year ago

darreal44 commented 1 year ago

Issue type: :question: Question

How to use regular expression as a parameter for a function (like grel:string_replace) ?

aw350m33d commented 10 months ago

You can use the shortcut version: grel:string_replace(valueParameter=$(id), p_string_find="\w-\w", p_string_replace="")

Or the full one:

- function: grel:string_replace
  parameters:
    - [grel:valueParameter, $(id)]
    - [grel:p_string_find, "\w-\w"]
    - [grel:p_string_replace, ""]