Link to home
Start Free TrialLog in
Avatar of jmc430
jmc430

asked on

How to remove values and parentheses from a string?

Greetings,

How can I only return the string value that is not included within parentheses?  For example, if I have an element <LINK TTL="17" S="210.4-01(a)(3)(i)(A)"> and I would only like the @S attribute to only return "210.4-01", how can this be processed?

Any advice or guidance is greatly appreciated!

Best regards,
Jamie
Avatar of BobSiemens
BobSiemens

<xsl:template name="DumpNonParenData">
  <xsl:param name="TheString" />
  <xsl:choose>
    <xsl:when test="contains($TheString, '(')">



ASKER CERTIFIED SOLUTION
Avatar of BobSiemens
BobSiemens

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jmc430

ASKER

Hi Geert,

Thanks for your helpful response!
I cannot use Saxon8B, but I appreciate your comments!

Hi BobSiemens,

Thanks for your solution.  It works!

Thanks again and happy holidays! :)