Re: [xsl] Seek an XPath expression that removes trailing spaces

Subject: Re: [xsl] Seek an XPath expression that removes trailing spaces
From: "Roger L Costello costello@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 6 Jul 2024 13:09:45 -0000
Martin Honnen wrote:

Use 'replace' e.g.
  Airport_Name => replace('\s*$', '')

Wow!

A couple minor tweaks are needed:

\s is more than just the space (x20) character. So, instead of \s I will use a
space.

 When I executed the expression, I got this error message:

FORX0003  The regular expression must not be one that matches a zero-length
string

So, I need to use + instead of *

Here's the updated XPath:

replace(Airport_Name,' +$','')

Thank you Martin!

/Roger

Current Thread