Is there any way to get the current deck name by using regular expression?
ex. dec:AAA:BBB:CCC
CCC would like to be got retrieved
In which context do you want to use this? There is probably a better way than to use a regex.
But techincally, (?:.+::)?(.+)
would probably capture the deck name without parents.
2 Likes
following case,
FRONT:DECK:AAAA
“AAAA” would like to be replaced with the deck name which the card belongs to.
Find: AAAA
Replace with: (?:.+::)?(.+)
set on → Treatment input as a regular expression
Failed to replace with when executing the replace command above;
That’s not how Find & Replace works. You use a regex to find/capture stuff and a backreference like $1
to replace with it.
What is “FRONT:DECK:AAAA” and where does it appear? If you want to see the deck name on a card, put a special field on the template.
1 Like