Understanding Regular Expressions


#1

Giving a directory name: 'CD 2 Latin For Lovers'
using a regular expression: $regexp(%_directory%, *(CD) *\d+,$1,0)
I would expect to get the result: 'CD'
but actually the result is: 'CD Latin For Lovers'

What is wrong?

DD.20070119.1712

This returns the string "CD" ...

$regexp('CD 2 Latin For Lovers','^.*(CD) \d+ .*$','$1',0)

DD.201200712.1429.CEST