Bob, thanks so much that must be what's happening.




On Wed, Jun 4, 2014 at 4:36 PM, Robert Haschart <rh9ec@virginia.edu> wrote:
I'm recalling something about it applying all of the patterns that match, rather than stopping after making a first match.  
So it applies the   (.*)=>$1   pattern to remove the parens, and then applies the   .*   pattern.  
I'm not sure of my reasons/use case for making it work this way.  

If you can explain your desired results, I'll try to help.

-Bob Haschart



On 6/4/2014 4:00 PM, Demian Katz wrote:

Last I checked, the OCLC regex map was still working:

 

# Extract the numeric portion of the OCLC number using a pattern map:

oclc_num = 035a, (pattern_map.oclc_num)

pattern_map.oclc_num.pattern_0 = \\([Oo][Cc][Oo][Ll][Cc]\\)[^0-9]*[0]*([0-9]+)=>$1

pattern_map.oclc_num.pattern_1 = ocm[0]*([0-9]+)[ ]*[0-9]*=>$1

pattern_map.oclc_num.pattern_2 = ocn[0]*([0-9]+).*=>$1

pattern_map.oclc_num.pattern_3 = on[0]*([0-9]+).*=>$1

 

- Demian

 

From: solrmarc-tech@googlegroups.com [mailto:solrmarc-tech@googlegroups.com] On Behalf Of Anna Headley
Sent: Wednesday, June 04, 2014 10:41 AM
To: solrmarc-tech@googlegroups.com; vufind-tech@lists.sourceforge.net
Subject: [solrmarc-tech] Using groups in pattern-based translation map

 

Hi solrmarc and vufind folks,

Are you successfully using groups in a pattern-based translation map?

Is there a solrmarc test covering this case?

After a bunch of troubleshooting I am down to the following:

punct.pattern_0 = (.*)=>$1                                             
punct.pattern_1 = .*=>test 

 

And it's coming out 'test' every time.

 

Thanks!
Anna

--
You received this message because you are subscribed to the Google Groups "solrmarc-tech" group.
To unsubscribe from this group and stop receiving emails from it, send an email to solrmarc-tech+unsubscribe@googlegroups.com.
To post to this group, send email to solrmarc-tech@googlegroups.com.
Visit this group at http://groups.google.com/group/solrmarc-tech.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "solrmarc-tech" group.
To unsubscribe from this group and stop receiving emails from it, send an email to solrmarc-tech+unsubscribe@googlegroups.com.
To post to this group, send email to solrmarc-tech@googlegroups.com.
Visit this group at http://groups.google.com/group/solrmarc-tech.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "solrmarc-tech" group.
To unsubscribe from this group and stop receiving emails from it, send an email to solrmarc-tech+unsubscribe@googlegroups.com.
To post to this group, send email to solrmarc-tech@googlegroups.com.
Visit this group at http://groups.google.com/group/solrmarc-tech.
For more options, visit https://groups.google.com/d/optout.