<commit_before>" This is a the way that we have Tritium communicate variables back to its execution environment. - [click for example](http://beta.moovweb.com/learn/reference/configuration/index#Environment+Variables)@example `export(\"Content-Type\", \"application/js\")` changes the content-type to application/js."

@func export(Text %key, Text %value) {
  export(%key) {
    set(%value)
    yield()
  }
}

"Parses regular expressions. (Use hard-coded regex if you can. This is much slower than hard-coding regex.) @example `with(regexp(\"a\"))` is equivalent to `with(/a/)`. "

@func regexp(Text %exp) {
  regexp(%exp, "")
}

"References to the assets folder without hard-coding a path - [click for example](http://beta.moovweb.com/learn/training/function_guides/asset). @example `asset(\"images/icon.png\")` points to *assets/images/icon*, including the domain if necessary."
@func asset(Text %name) {
  concat($asset_host, %name) {
    yield()
  }
}

"Prints the time a block took to run. @example `html() { bm(\"TIME\") }` will print the time it took to parse the HTML in the server logs in the format 'TIME: x ms'."
@func bm(Text %name) {
  log(concat(%name, ": ", 
    time() {
      yield()
    }))
}

"If only one string is to be matched, it can be placed after the target - [click for example](http://beta.moovweb.com/learn/training/function_guides/match). @example `match($path, \"product\")` will see if 'product' appears in the path of the current url."


# @abstract The match function is used for logic to check against the content of strings and variables.
# @name Name of the function 
# @category Category type of function, in this case Environment.
# @scope Scope Type
# @arg Arguments
# @description In-depth description. If only one string is to be matched, it can be placed after the target.
# @example
## $path = "product" 
## match($path, "product") {
##   log("Match successful!")
## }
# @exampletext Here's a link to example in Tritium tester
# @examplelink Link
# @guidetext Here's a link to an in-depth guide on how to use this function.
# @guidelink Link

@func match(Text %target, Text %comparitor) {
  match(%target) {
    with(%comparitor) {
      yield()
    }<commit_msg>modifying the example function spec<commit_after>" This is a the way that we have Tritium communicate variables back to its execution environment. - [click for example](http://beta.moovweb.com/learn/reference/configuration/index#Environment+Variables)@example `export(\"Content-Type\", \"application/js\")` changes the content-type to application/js."

@func export(Text %key, Text %value) {
  export(%key) {
    set(%value)
    yield()
  }
}

"Parses regular expressions. (Use hard-coded regex if you can. This is much slower than hard-coding regex.) @example `with(regexp(\"a\"))` is equivalent to `with(/a/)`. "

@func regexp(Text %exp) {
  regexp(%exp, "")
}

"References to the assets folder without hard-coding a path - [click for example](http://beta.moovweb.com/learn/training/function_guides/asset). @example `asset(\"images/icon.png\")` points to *assets/images/icon*, including the domain if necessary."
@func asset(Text %name) {
  concat($asset_host, %name) {
    yield()
  }
}

"Prints the time a block took to run. @example `html() { bm(\"TIME\") }` will print the time it took to parse the HTML in the server logs in the format 'TIME: x ms'."
@func bm(Text %name) {
  log(concat(%name, ": ", 
    time() {
      yield()
    }))
}

"If only one string is to be matched, it can be placed after the target - [click for example](http://beta.moovweb.com/learn/training/function_guides/match). @example `match($path, \"product\")` will see if 'product' appears in the path of the current url."
# @abstract The match function is used for logic to check against the content of strings and variables.
# @name match
# @category Environment
# @scope Text
# @args Text %target, %Text %comparitor
# @description If only one string is to be matched, it can be placed after the target.
# @example
#   $path = "product"
#   match($path, "product") {
#     log("Match successful!")
#   }
# @exampletext Here's a link to example in Tritium tester
# @examplelink http://tritium.moovweb.com/example/fd89fdsa
# @guidetext Here's a link to an in-depth guide on how to use this function.
# @guidelink http://spec.moovweb.com/details/match
@func match(Text %target, Text %comparitor) {
  match(%target) {
    with(%comparitor) {
      yield()
    }
{'fraction_non_alphanumeric': 0.13630229419703105, 'fraction_numerical': 0.000449842555105713, 'mean_word_length': 4.036240090600226, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '328427', 'n_tokens_mistral': 1369, 'n_tokens_neox': 1348, 'n_words': 504}