Problem with Google Search AI Overviews citation links

Recently I am copying Google Search AI Overviews results into my Obsidian notes a lot. When I do this there is an additional set of square bracket around the citation links at the end of every paragraph. As result, the citation links expanded which makes the notes unreadable.

Example,

It looks like this

[[1](https://www.sciencedirect.com/topics/computer-science/organisational-theory), [2](https://en.wikipedia.org/wiki/Organizational_theory), [3](https://www.ebsco.com/research-starters/economics/organizational-theory), [4](https://www.indeed.com/career-advice/career-development/what-is-organizational-theory)]

instead of just

[1],[2],[3]

Since AI Overviews gives citation every couple of lines, notes are untidy and it takes a lot of time to remove the additional square brackets that wrap every set of citation.

Is there a simple was way to deal with this?

Note: I agree that the origin of the issue is external to Obsidian. But since Google so widely used it will be helpful if there is a clean and simple way to deal with it.

I use the Obsidian 1.13.4 (installer 1.12.7)

Thank you!

From a systematic view, it’s just data cleaning. Regex replacement is one option.

A quick search for “regex” turns up plugins Regex Pipeline, Regex Replace, Paste transform, Auto replacer, Search and Replace Regex, and more. Some of those say they automatically run when pasting or with other defined rules.

A starter search string you can test to see if it catches all of your pasted citations:

/^\[(\[\d+\]\(.+\))\]$/

If that works, then the replacement string for that is: $1