Espen S. Ore | 21 Jun 2012 13:04

Module text:matches-regex() - does it exist?

Greetings,

I asked this question in another thread but believe it is more correct 
to ask it with its own subject line. I am trying to use 
text:matches-regex() and get an error message that claims that is not 
available. I am using eXist 1.4.1 and have this setup in my xquery-file:

...
declare namespace text="http://exist-db.org/xquery/text";
....

and try to use it like this:

text:matches-regex(util:document-name($scopesok), "*ht.xml")

and get this error message:

Function text:matches-regex()  is not defined in module namespace: 
http://exist-db.org/xquery/text

Any advice?

Espen S. Ore
University of Oslo

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
(Continue reading)

Joe Wicentowski | 21 Jun 2012 14:52
Picon
Gravatar

Re: Module text:matches-regex() - does it exist?

Hi Espen,

I did a little digging, and while Andrzej committed
text:matches-regex() to trunk on February 2, 2010 [1], his commit
wasn't ported to the 1.4.x stable branch in time for the August 15,
2010 release of 1.4.1 and in fact still isn't in the 1.4.x branch [2].
 Given this, your best bet at the moment is either to use fn:matches()
[3] or more simply fn:ends-with [4], or to upgrade to 2.0 Tech
Preview.

Cheers,
Joe

[1] http://exist.svn.sourceforge.net/exist/?rev=11110&view=rev
[2] http://exist.svn.sourceforge.net/viewvc/exist/stable/eXist-1.4.x/src/org/exist/xquery/functions/text/
[3] http://exist-db.org/exist/functions/fn/matches
[4] http://exist-db.org/exist/functions/fn/ends-with

On Thu, Jun 21, 2012 at 7:04 AM, Espen S. Ore <espen <at> espenore.tk> wrote:
> Greetings,
>
> I asked this question in another thread but believe it is more correct
> to ask it with its own subject line. I am trying to use
> text:matches-regex() and get an error message that claims that is not
> available. I am using eXist 1.4.1 and have this setup in my xquery-file:
>
> ...
> declare namespace text="http://exist-db.org/xquery/text";
> ....
>
(Continue reading)

Espen S. Ore | 21 Jun 2012 18:28

Re: Module text:matches-regex() - does it exist?

Thank you very much!

Since this is a production server I believe I will stick with the 1.4.x 
solutions you suggest until we take the big step up to the release 
version of 2.x.

All the best,
Espen

Den 21. juni 2012 14:52, skrev Joe Wicentowski:
> Hi Espen,
>
> I did a little digging, and while Andrzej committed
> text:matches-regex() to trunk on February 2, 2010 [1], his commit
> wasn't ported to the 1.4.x stable branch in time for the August 15,
> 2010 release of 1.4.1 and in fact still isn't in the 1.4.x branch [2].
>   Given this, your best bet at the moment is either to use fn:matches()
> [3] or more simply fn:ends-with [4], or to upgrade to 2.0 Tech
> Preview.
>
> Cheers,
> Joe
>
> [1] http://exist.svn.sourceforge.net/exist/?rev=11110&view=rev
> [2] http://exist.svn.sourceforge.net/viewvc/exist/stable/eXist-1.4.x/src/org/exist/xquery/functions/text/
> [3] http://exist-db.org/exist/functions/fn/matches
> [4] http://exist-db.org/exist/functions/fn/ends-with
>
>
> On Thu, Jun 21, 2012 at 7:04 AM, Espen S. Ore<espen <at> espenore.tk>  wrote:
(Continue reading)

Espen S. Ore | 21 Jun 2012 18:27
Picon

Re: Module text:matches-regex() - does it exist?

Thank you very much!

Since this is a production server I believe I will stick with the 1.4.x 
solutions you suggest until we take the big step up to the release 
version of 2.x.

All the best,
Espen

Den 21. juni 2012 14:52, skrev Joe Wicentowski:
> Hi Espen,
>
> I did a little digging, and while Andrzej committed
> text:matches-regex() to trunk on February 2, 2010 [1], his commit
> wasn't ported to the 1.4.x stable branch in time for the August 15,
> 2010 release of 1.4.1 and in fact still isn't in the 1.4.x branch [2].
>   Given this, your best bet at the moment is either to use fn:matches()
> [3] or more simply fn:ends-with [4], or to upgrade to 2.0 Tech
> Preview.
>
> Cheers,
> Joe
>
> [1] http://exist.svn.sourceforge.net/exist/?rev=11110&view=rev
> [2] http://exist.svn.sourceforge.net/viewvc/exist/stable/eXist-1.4.x/src/org/exist/xquery/functions/text/
> [3] http://exist-db.org/exist/functions/fn/matches
> [4] http://exist-db.org/exist/functions/fn/ends-with
>
>
> On Thu, Jun 21, 2012 at 7:04 AM, Espen S. Ore<espen <at> espenore.tk>  wrote:
(Continue reading)


Gmane