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

[HTCondor-users] Regular Expressions in -constraint



Hello,

 

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

 

returns:

191105105207_lidarMatching_DAG.dag+1243

 

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,
Mark