The regex solution worked great! Thanks
-----Original Message----- From: general-boun...@developer.marklogic.com [mailto:general-boun...@developer.marklogic.com] On Behalf Of G. Ken Holman Sent: Friday, June 03, 2011 11:05 AM To: General MarkLogic Developer Discussion Subject: Re: [MarkLogic Dev General] document name function At 2011-06-03 11:05 -0400, Gary Larsen wrote: >If there an xQuery function to return the document name? > >fn:document-uri(xdmp:directory('/db/netvisn/global/analysis/result/', >'infinity')) > >returns > >/db/netvisn/global/analysis/result/98bbdd41-34b9-45d3-833e-4afe65fb9ec3.xml > >But what I need is > >98bbdd41-34b9-45d3-833e-4afe65fb9ec3.xml replace( $fullname, '.*/([^/]+)$', '$1' ) I hope this helps. . . . . . . . . Ken -- Contact us for world-wide XML consulting & instructor-led training Crane Softwrights Ltd. http://www.CraneSoftwrights.com/q/ G. Ken Holman mailto:gkhol...@cranesoftwrights.com Legal business disclaimers: http://www.CraneSoftwrights.com/legal _______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list General@developer.marklogic.com http://developer.marklogic.com/mailman/listinfo/general