<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hi All,<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
This is slightly related to my previous thread today, but more general.<br>
<br>
I want to gauge interested in this idea.<br>
I want to be able to use Runtime Substitution mechanisms to do something like this:<br>
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-size: 11pt; font-family: "Courier New", monospace;">MAP</span><br>
<span style="font-size: 11pt; font-family: "Courier New", monospace;">  ...</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-size: 11pt; font-family: "Courier New", monospace;">  VALIDATION</span><br>
<span style="font-size: 11pt; font-family: "Courier New", monospace;">    "datetime" "^([0-9]{4})[-_]([0-9]{2})[-_]([0-9]{2})$" # <- 3 capture groups</span><br>
<span style="font-size: 11pt; font-family: "Courier New", monospace;">  END</span><br>
<span style="font-size: 11pt; font-family: "Courier New", monospace;">  </span><br>
<span style="font-size: 11pt; font-family: "Courier New", monospace;">  LAYER</span><br>
<span style="font-size: 11pt; font-family: "Courier New", monospace;">    DATA "/mnt/dataset/%datetime_1%/%datetime_2%/%datetime_3%.tif"</span><br>
<span style="font-size: 11pt; font-family: "Courier New", monospace;">    ...</span><br>
<span style="font-size: 11pt; font-family: "Courier New", monospace;">  END</span><br>
<span style="font-size: 11pt; font-family: "Courier New", monospace;">  ...</span><br>
<span style="font-size: 11pt; font-family: "Courier New", monospace;">END</span><br>
<br>
Where the query with &datetime=2018-01-29 is split into parts using capture groups 1, 2, and 3 from the validation regex, and stored as new runtime substitution variables: %datetime_1%, %datetime_2%, and %datetime_3%.<br>
Then using these values, substitute them into the DATA string (or any other valid substitution point).<br>
Substituted:<br>
<span style="font-family:"Courier New", monospace;font-size:14.6667px;background-color:rgb(255, 255, 255);display:inline !important">DATA "/mnt/dataset/2018/01/29.tif"<br>
</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
The regex mechanism to validate the incoming parameter value is already in place, and it seems like just one more little step is needed to save the captured groups into new runtime substitution variables.<br>
<br>
- Ashley Sommer</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
</div>
</body>
</html>