> [!column|flex no-title]
>> [!menu-dark-red|ttl-c] [[Obsidian TTRPG Tutorials]] / [[Plugin Tutorials]] / [[RegEx]] / [[Regex Pipeline - Remove Source References]]
> [!column|4 no-title]
>> [!menu-green-1|ttl-c] [[Getting Started]]
>
>> [!menu-green-2|ttl-c] [[Plugin Tutorials]]
>
>> [!menu-green-3|ttl-c] [[Community Supported Games]]
>
>> [!menu-green-4|ttl-c] [[Obsidian TTRPG Tutorials/Templates/Templates\|Templates]]
> [!column|3 no-title]
>> [!patreon|ttl-c] [Patreon](https://www.patreon.com/JPlunkett) ([Starter Vault](https://www.patreon.com/posts/obsidian-patreon-96801399))
>
>> [!discord|ttl-c] [Obsidian TTRPG Community Discord](https://discord.gg/CdM9UCJdwU)
>
>> [!discord|ttl-c] [Obsidian Official Discord](https://discord.gg/obsidianmd)
**Usage:** This one is really handy when you are copy and pasting from a source that includes lots of source mentions. Like this [4]. I copy quite a bit of content from the D&D Wiki's which list their sources. But I don't like to have those sources in my notes. I used to manually remove them but now I can just highlight the text, right click and select `Regex Pipeline: Replace Sources`.
##### Regex Pattern
````
"\[citation needed\]|\[[0-9]+\]"
->
""
````
##### How Does It Work?
This one is actually 2x patterns.
| Regex Pattern | Match Highlighted | Explanation | |
| --------------------- | ----------------------------- | ---------------------------------------- | --- |
| \\[citation needed\\] | text `[citation needed]` text | Find all instances of [citation needed]. | |
| \| | Does not match anything. | This means OR. Match this OR this. | |
| \\[[0-9]+\\] | text `[53]` text `[3]` text | Find all sources references. | |
All found patterns are replaced with nothing which basically just removes the found patterns from the notes.