# SpanExcluding()

Gets characters from a string, from the beginning to a character that is in a specified set of characters.

The search is case-sensitive.

```
SpanExcluding( string=string, set=string );
```

**Returns:** string

# Arguments

| Argument | Type | Required | Description | Default |
|----------|------|----------|-------------|---------|
| string | string | Yes | A string or a variable that contains one |  |
| set | string | Yes | A string or a variable that contains a set of characters. Must contain one or more characters |  |

# Examples

```cfml
writeDump(spanExcluding("Plant green! save earth!", "s"));
//Member Function
str="AabByyysss";
writeDump(str.spanExcluding("s"));
```







# Categories

[Strings](../../categories/string.md)

# See Also

[string.spanExcluding()](../objects/string/spanexcluding.md)