--- title: "copy variables into map()" slug: "basic-copy-variables-into-map" updated: 2026-08-11T07:51:27Z published: 2026-08-11T07:51:27Z canonical: "docs.lobstersoftware.com/basic-copy-variables-into-map" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # copy variables into map() This function copies variables into map **d**. The keys in the map are the names of the variables and the values in the map are the values of the variables. Returns the number of copied variables. **NOTE:** MSG_CALL_ variables are written into the map even if they are not created. See examples. ## Parameters | Parameter | Description | | --- | --- | | a | (optional) Regular expression. If a variable name matches this expression, the variable is written into the map. If the parameter remains empty, all variables are written into the map. | | b | (optional) Prefix to cut off. | | c | (optional) New prefix to add instead of **b**. Only works if a value is specified in **b**. | | d | Name of the map. | ## Examples | Parameter a | Parameter b | Parameter c | Parameter d | | --- | --- | --- | --- | | | | | mymap | | ^MSG_CALL_HEADER_HTTP_.* | MSG_CALL_HEADER_HTTP_ | REQUEST_HTTP_HEADER_ | mymap |