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: 
Just use [`Array#some`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some):

> 
> `some()` executes the callback function once for each element present in the array until it finds one where callback returns a true value. If such an element is found, `some()` immediately returns `true`. 
> 
> 
> 

```
var interested = client.interests.some(function(regex) {
  return regex.test(evt.event_type);
});

```

Of course you can also use lodash's `_.some` implementation.
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. :)