Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: XQuery replace
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: XQuery replace



That is correct; it is a known bug. You can use JavaScript's replace instead:

"abracadabra".replace(/a.*?a/g,  "*")

If you're doing this a lot you could create a JavaScript service so you can just call "jsReplace" or something of the sort from XQuery.

--Sarah

On Feb 26, 2004, at 6:10 AM, Dirk Musfeldt wrote:

Hi,

is it possible that reluctant quantifiers are not supported for regular
expressions?

This is from <http://www.w3.org/TR/xpath-functions/>:

replace("abracadabra", "a.*?a",  "*") returns "*c*bra"

but actually it returns "abracadabra".


What am I doing wrong?



With kind regards

Dirk Musfeldt
Meilenstein Mac OS Software

Neue Strasse 5
D-31582 Nienburg
Germany
Tel: +49 (0) 5021 91 24 44
Fax: +49 (0) 5021 91 24 45
<http://www.meilenstein.de/>
_______________________________________________
sherlock-channel-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/sherlock-channel- development
Do not post admin requests to the list. They will be ignored.
_______________________________________________
sherlock-channel-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/sherlock-channel-development
Do not post admin requests to the list. They will be ignored.


References: 
 >XQuery replace (From: Dirk Musfeldt <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.