# How to modify AuthorAndsReplacer?

**URL:** <https://discourse.jabref.org/t/how-to-modify-authorandsreplacer/3216>\
**Category:** Help\
**Created:** [February 16, 2022, 1:45pm UTC](https://discourse.jabref.org/t/how-to-modify-authorandsreplacer/3216 "2022-02-16T13:45:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jhh](https://avatars.discourse-cdn.com/v4/letter/j/258eb7/32.png) [@jhh](https://discourse.jabref.org/u/jhh)\
**Post date:** [February 16, 2022, 1:45pm UTC](https://discourse.jabref.org/t/how-to-modify-authorandsreplacer/3216/1 "2022-02-16T13:45:16Z")

</div>

The author fields are like

> author{Author, A. and Author, B. and Author, C.}.

Export filters that I use

> \format[RTFChars,AuthorLastFirstAbbrCommas,AuthorAndsReplacer]{\author}

Which gives as output:

> Author, A., Author, B. & Author, C.

One detail: when producing APA-style output, there needs to be an **extra comma before the “&”**. Like this:

> Author, A. , Author, B., & Authors, C.

I would guess that I need to do this via the AuthorAndsReplacer, but I have no idea how… Any hints?

---

<div class="post-metadata">

**Author:** ![ThiloteE](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/thilotee/32/1008_2.png) [@ThiloteE](https://discourse.jabref.org/u/ThiloteE)\
**Post date:** [February 18, 2022, 10:27am UTC](https://discourse.jabref.org/t/how-to-modify-authorandsreplacer/3216/2 "2022-02-18T10:27:35Z")

</div>

Just a shot in the wild, but maybe regex works?

- **`:regex("pattern", "replacement")`**: Applies regular expression pattern matching and replacement. For example,
  - **`[auth.etal:regex("\\.etal","EtAl"):regex("\\.","And")]`**, the first `regex()` replaces `.etal` with `EtAl`. The second `regex()` replaces the `.` between entries with two authors with `And`

See [here](https://docs.jabref.org/setup/citationkeypatterns) for regex syntax

---

<div class="post-metadata">

**Author:** ![k3KAW8Pnf7mkmdSMPHz2](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.jabref.org/k3kaw8pnf7mkmdsmphz2/32/1116_2.png) [@k3KAW8Pnf7mkmdSMPHz2](https://discourse.jabref.org/u/k3KAW8Pnf7mkmdSMPHz2)\
**Post date:** [February 18, 2022, 7:55pm UTC](https://discourse.jabref.org/t/how-to-modify-authorandsreplacer/3216/3 "2022-02-18T19:55:49Z")

</div>

You might also try to use the [`Authors` formatter](https://docs.jabref.org/collaborative-work/export/customexports#the-authors-formatter) with the `AuthorLastSep`?

It might be easier to start with the [examples](https://docs.jabref.org/collaborative-work/export/customexports#examples), even if they don’t cover your case in particular.
