title: using regex in searching for a field using get_field_by_name
body: <p>I am trying to get a uvm register field by name in systemverilog. I want to use regex, so that I can use a pattern for the field name. Here is my register fields:</p>
  
  <pre><code>YY_XXX_2_N
  ZZ_BBB_3_N
  UU_AAA_8_N
  MM_CCC_4_N
  YY_WWW_9_N
  </code></pre>
  
  <p>as you can see all register fields are ending with _N, I used the following code to get register field:</p>
  
  <pre><code>field=env.my_regmap.get_field_by_name("_N$");
  </code></pre>
  
  <p>so I want this code to get A register field matching the provided pattern. with the code above, I am getting the following error:</p>
  
  <pre><code>reporter [RegModel] Unable to locate field '_N$' in block 'my_regmap'
  </code></pre>
  
  <p>I wonder if there is a way to use regex in this situation.</p>
  
  <p>Thanks!</p>