View Single Post
Old 07-08-2014, 09:34 AM   #521
chaley
"chaley", not "charley"
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 5,800
Karma: 1216080
Join Date: Jan 2010
Location: France
Device: Many android devices
Quote:
Originally Posted by eschwartz View Post

At some point I thought I'd try list_re to fix your example.

But I discovered this:

Code:
program:

list_re(
	field('author_sort'),
	'&',
	'(.*)',
	'\1'
)
gave me "LN1&FN1&LN2&FN2" -- isn't it supposed to search for "(.*)" and replace with "\1" on each list element where "&" is the separator? I cannot imagine what I might be doing wrong. But this looks completely crazy.
It works fine for me. The names come out exactly as they went in, except that the spaces are gone from around the &. I have no idea why you are seeing what you are seeing.

BTW: a better fix would be to use the new function list_re_group so you can separate the identification of which names to include from the munging of the names.
chaley is offline   Reply With Quote