Question: In my data set there is a field that is currently a character field and I need to convert it to a numeric one. the problem is not only are there '%' signs hard coded in the data but there are decimal points in there as well and places after the decimal points is not consistent. AKA...

```
    42.01%
      8.1%
       22%
      .05%

```

I substringed off the % sign but is there a way to just cut the decimal point off and everything after it so then I can just cast it as an integer?

thanks all

Answer: 
You could use [`_.some`](https://lodash.com/docs#some), when the function passed returns a truthy value iteration will stop and true will be returned. If it can't find a truthy value it will return false, after iterating through the entire array.

Example:

```
_.forEach(self._connectedClients, function(client) {
    if (client.authenticated) {
        if (_.some(client.interests, _.method('test', evt.event_type))) {
            self._sendJSON(client.socket, data);
        }
    }
});

```
If I'm understanding you correctly, using plain javascript, you could do the following to check for [matches of a single string over multiple regular expressions](http://snipref.com/javascript/javascript-matching-a-string-to-an-array-of-regex-expressions/).

```
for(var i = 0; i<x.length; i++) {
  var regex = x[i]; console.log('regex', regex);
  if( str.match( x[i] ) ) {
    console.log("regex:",x[i]," matching: true");
  } else {
    console.log("regex:",x[i]," matching: false");
  }
}

```

However, if you meant something else, then do clarify. :)