Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: cb93594abb
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (14 sloc) 0.503 kB

Matching Records in a Map Phase with a Regex

Contributed By: Joe …

[[Source File on GitHub|https://github.com/basho/riak_function_contrib/blob/master/mapreduce/js/regex_key_match.js]]

As you can see, this is a simple function written in JavaScript. Its original use was to return keys that match a given regex.

This is the entirety of the function:

```js
function keyMatch(value, arg){
if (value.values0.data.match(arg)){
return [value.key]
}else{
return []
}
}
```

Jump to Line
Something went wrong with that request. Please try again.