Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to check if a string as numbers in XSLT

 
vinodreddy kisanagaram
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

Can you please let me know the function name and usage to find if a given string has numbers in it... like

"app3le" has 3 in it..

I have found one function in w3schools website:

contains(string1,string2)

which returns true if string1 contains string2, otherwise it returns false

Example: contains('XML','XM')
Result: true

but using this function and looping it 10 times (i.e., from 0-9) is bit tedious.

Can you suggest some other way...

Thanks in advance
 
Pavel Cherkashin
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
XSLT 2.0 support regular expression.
Regard these links:
the good publication

the chapter from zvon.org tutorial

the official xslt 2.0 specification (very long html document)-chapter 15 is about regexps

The zvon.org can be usable as a xslt reference (elements, functions etc)
[ February 28, 2008: Message edited by: Pavel Cherkashin ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic