Originally Posted by eschwartz
Problem from before:
Stupid me, I know what the problem is here. I created a new capture group at the beginning to remove leading spaces, but left the replace code replacing the nonexistent capture group. Properly, it should've been this (fix in red):
Code:
Name: #initials. Template: {#stripped_series:re(([\s])?([^\s])[^\s]+(\s|$),\2)}
Or really this:
Code:
Name: #initials. Template: {#stripped_series:re([\s]?([^\s])[^\s]+(\s|$),\1)}
since I can't think why I created a capture group in the first place -- it does nothing.
And without the formatting error, it seems to work perfectly. Try this again?
EDIT: @chaley, perhaps this should be updated in the first post? This is derived from what Kovid used in his general program mode guide. I used [^\s] instead of [\w], following your lead, but added the inverse at the beginning, like Kovid's example.
EDIT by chaley: done.
|