[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [HTCondor-users] Regular Expressions in -constraint
- Date: Wed, 06 Nov 2019 07:45:52 +0100 (CET)
- From: "Beyer, Christoph" <christoph.beyer@xxxxxxx>
- Subject: Re: [HTCondor-users] Regular Expressions in -constraint
interesting need to try that myself but out of the too of my head: you surely need to put '$JobBatchName' otherwise you try to match the string and not the variable ?
Building 02b, Room 009
----- UrsprÃngliche Mail -----
Von: O'NEAL Mark via HTCondor-users <htcondor-users@xxxxxxxxxxx>
CC: O'NEAL Mark <mark.oneal@xxxxxxxxxxx>
Gesendet: Wed, 06 Nov 2019 07:01:03 +0100 (CET)
Betreff: [HTCondor-users] Regular Expressions in -constraint
I'm trying out the regular expression functionality of HTCondor's ClassAd mechanism, and have a question for some behavior I don't yet understand.
As background, I would eventually like to utilize a portion of the JobBatchName attribute as a Requirement for matching jobs with machines.
To test how this might work, I'm using condor_q to learn. HTCondor 8.8.4 running on Windows.
To identify the JobBatchName:
condor_q -nobatch -format %s\n JobBatchName
The string 'lidarMatching' in the JobBatchName is the portion of interest.
I have constructed a regular expression which I think is successfully matching on JobBatchName:
condor_q -nobatch -constraint " regexp(""([0-9]+)(_)([A-Za-z]+)"", JobBatchName) "
as it will return all queued jobs with a JobBatchName formatted like above.
I try to confirm that I am capturing 'lidarMatching' in the way I expect the regexp should be working:
condor_q -nobatch -constraint " regexp(""([0-9]+)(_)([A-Za-z]+)"", JobBatchName, ""\3"") == ""lidarMatching"" "
but this command doesn't return any jobs.
Could someone point to a way with condor_q or other command line to simply 'print' what is matched by the different regexp capture groups?
Thanks and Regards,