Commit 1cc01793 authored by Robert Verkerk's avatar Robert Verkerk
Browse files

Search EUDAT/REPLICA for to be added replicas using case insensitive search

parent 846a0413
#!/usr/bin/env python
import re
import sys
def search_pattern_in_string(pattern, string):
"""
search_pattern_in_string. Search if a pattern matches in a string.
return match in string if found.
return "no match found!" if not found
"""
searchObj = re.search(pattern, string, re.U|re.I)
if searchObj:
print searchObj.group()
else:
print "no match found!"
if __name__ == "__main__":
search_pattern_in_string(sys.argv[1], sys.argv[2])
......@@ -195,7 +195,9 @@ EUDATUpdatePIDWithNewChild(*parentPID, *childPID) {
*replicaNew = *childPID;
}
else {
if (*replica like "*"++*childPID++"*") {
msiExecCmd("regex_search_string.py","*childPID *replica", "null", "null", "null", *status);
msiGetStdoutInExecCmdOut(*status, *response);
if (*response not like "no match found!") {
*replicaNew = *replica;
}
else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment