# SpanExcluding

Returns all characters from string from its beginning until it reaches a character from the set of characters. The search is case-sensitive.

See also GetToken and SpanIncluding.

### Syntax

    SpanExcluding(string, set)

##### string

Any string.

##### set

String containing one or more characters being sought.

### Examples

    <!--- Displays SpanExcluding --->
    <HTML>
    <HEAD>
    <TITLE>
    SpanExcluding Example
    </TITLE>
    </HEAD>

    <BODY BGCOLOR=silver>
    <H3>SpanExcluding Example</H3>

    <CFIF IsDefined("FORM.myString")>
    <P>Your string was <CFOUTPUT>#FORM.myString#</CFOUTPUT>
    <P>Your set of characters was <CFOUTPUT>#FORM.mySet#</CFOUTPUT>
    <P>Your string up until one of the characters in the set is:
    <CFOUTPUT>#SpanExcluding(FORM.myString, FORM.mySet)#</CFOUTPUT>
    </CFIF>

    <P>Returns all characters from string from
    beginning until it reaches a character from the set
    of characters.  The search is case-sensitive.

    <FORM ACTION="spanexcluding.cfm" METHOD="POST">
    <P>Enter a string:
    <BR><INPUT TYPE="Text" NAME="myString" VALUE="Hey, you!">
    <P>And a set of characters:
    <BR><INPUT TYPE="Text" NAME="mySet" VALUE="Ey">
    <BR><INPUT TYPE="Submit" NAME="">
    </FORM>

    </BODY>
    </HTML>