Question: A designer I'm working with wants to have a UIImageView be at a specific y position, with a specific width/height depending on the iphone size. I've done research and I haven't been able to find anything online that allows me to do so with constraints on the story board. I want to avoid having to use code because throughout the rest of the app there are a lot of similar situations. In the past I've made different storyboards for each phone size to accommodate for the specificity our clients request, but I want to avoid doing this because it feels like bad practice. Is this even possible?

Answer: 
Hope that you need to get the numeric value from the string.

First, use the following to remove all non-digit characters.

```
value.replaceAll("\\D", "")

```

`\\D` stands for non-digit character. Once every such character is replaced with empty string (which means those are removed), use `Integer.parseInt` on it. (Use `Long.parseLong` if the values can be out of `Integer`'s range.)

In your code, you are trying to split the string by word character ends (which too is not done correctly; you need to escape it as `\\b`). That would give you an array having the result of the string split at each word end (after the AED, after the space following AED, after the first 3 digits, after the first comma and so on..), after which you are converting each of the resulting array components into integers, which would fail at the AED.

In short, the following is what you want:

```
Integer.parseInt(value.replaceAll("\\D", ""));

```
There are a few of things wrong with your code:

```
String[] tokens = value.split("\b");

```

The "\" needs to be escape, like this:

```
String[] tokens = value.split("\\b");

```

This will split your input on word boundaries. Only some of the elements in the tokens array will be valid numbers, the others will result in a NumberFormatException. More specifically, at index 2 you'll have "555", at index 4 you'll have 439, and at index 6 you'll have 972. These can be parsed to integers, the others cannot.