XSL: Return value where it contains two text values

I have the following text
<Tick Number="TK 1234 SRET/H JGK4FXT 1108/16OCT - AS"/>

How can I retrieve the 1234 where @Number contains "TK" and "- AS"
I currently only am searching for "TK"        

<xsl:value-of select="substring-before(substring-after(normalize-space($Tkting[contains(@Number, 'TK')][position() = $pos]/@Number), ' '), ' ')"/>

I want to use this in a count variable as well. Such as
<xsl:variable name="count">
  <xsl:value-of select="count($Tkting[contains(@Number, 'TK')])"/>
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Geert BormansInformation ArchitectCommented:
just AND them

[contains(@Number, 'TK')][contains(@Number, '- AS')]

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
badtz7229Author Commented:
great. thanks .
Geert BormansInformation ArchitectCommented:

by the way, XSLT1.0 has a starts-with(), but not an ends-with()
XSLT2.0 has an ends-with

but you can emulate an ends-with() like this
[substring(@Number, string-length(@Number) - 3) = '- AS']
note that the '3' in there is the string-length of the end-matching string MINUS 1

or more crafty

<xsl:variable name="end-match" select="'- AS'"/>
and then the test would be
[substring(@Number, string-length(@Number) - string-length($end-match) + 1) = $end-match]
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.