bashir saboori
bashir saboori

Reputation: 33

How to replace quotation mark with Guillemet

I want to convert quotation marks to Guillemet using Microsot Word wildcards or Regex.

Example

Before

"Quotation marks", also called "quotes", "quote marks", quotemarks, speech marks, inverted commas or talking marks

After

«Quotation marks», also called «quotes», «quote marks», quotemarks, speech marks, inverted commas or talking marks

Any help is welcomed!

Upvotes: 1

Views: 887

Answers (1)

Ulysse BN
Ulysse BN

Reputation: 11396

The regex for matching text and quotation marks:

"(.*?)"

Then you can replace using group 1 (usually $1 depending what you are using), and surrounding by guillemets.

See this in action.

A note about the regex: I am using *? quantifier (or lazy quantifier) which matches between zero and unlimited times, as few times as possible, expanding as needed.

Upvotes: 4

Related Questions