Hi Bharamani,
The matches() in XPath doesn't support negative lookahead, per the specification, so you can't use this syntax. But since this is XPath, I think you would gain anyway at writing the expression as:
matches(., '[0-9]{3}') and . != '999'
Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet