diff --git a/rdopkg/utils/specfile.py b/rdopkg/utils/specfile.py
index <HASH>..<HASH> 100644
--- a/rdopkg/utils/specfile.py
+++ b/rdopkg/utils/specfile.py
@@ -325,11 +325,10 @@ class Spec(object):
         """Return a tuple (version, number_of_commits) that are parsed
         from the patches_base in the specfile.
         """
-        match = re.search(r'(?<=patches_base=)[\w.+?%{}]+', self.txt)
-        if not match:
+        patches_base = self.get_magic_comment('patches_base')
+        if patches_base is None:
             return None, 0
 
-        patches_base = match.group()
         if expand_macros and has_macros(patches_base):
             # don't parse using rpm unless required
             patches_base = self.expand_macro(patches_base)
@@ -355,11 +354,9 @@ class Spec(object):
         Only a very limited subset of characters are accepted so no fancy stuff
         like matching groups etc.
         """
-        match = re.search(r'# *patches_ignore=([\w *.+?[\]|{,}\-_]+)',
-                          self.txt)
-        if not match:
+        regex_string = self.get_magic_comment('patches_ignore')
+        if regex_string is None:
             return None
-        regex_string = match.group(1)
         try:
             return re.compile(regex_string)
         except Exception:
specfile: convert to using get_magic_comment

* now that we have functionality swap out duplicate
  regex for get_magic_comment method which is available
* replace duplicate logic in get_patches_base and get_patches_ignore_regex

Change-Id: Id<I>da2be1b9a<I>d4f<I>