[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[HTCondor-users] help on classAd regexp



Hi experts,

with reference to https://htcondor.readthedocs.io/en/latest/classads/classad-builtin-functions.html#regexp()

Can you clarify what are the available String options ? (in case some is useful to me..)

But the important question is which regular expression patterns are supported ?

I am interested in asking for a given pattern to be have a given number
of matches (e.g. 1, but not 2 or more) but using the {n,m} syntax
indicated in Python or Perl documentation for match quantifiers
does not give me the desired outcome.
As and example let's try to check if the classAd
"T1_a,T1_b" contains two instances of "T1" (rather than just one):

[crabtw@vocms069 ~]$
[crabtw@vocms069 ~]$ condor_q 1641600.0 -af 'regexp("T1","T1_a,T1_b")'
true
[crabtw@vocms069 ~]$ condor_q 1641600.0 -af 'regexp("(T1)","T1_a,T1_b")'
true
[crabtw@vocms069 ~]$ condor_q 1641600.0 -af 'regexp("(T1){1}","T1_a,T1_b")'
true
[crabtw@vocms069 ~]$ condor_q 1641600.0 -af 'regexp("(T1){2}","T1_a,T1_b")'
false
[crabtw@vocms069 ~]$

Is what I am looking for simply impossible ?


Thanks

Stefano