Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

How to check if a string as numbers in XSLT

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
This guy is skipping without a rope. At least, that's what this tiny ad said:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic