Follow TV Tropes

Following

Sandbox / Dueling Works

Go To

Regex to match:

/\|\|\s*(.*?)\s*\|\|\s*(.*?)\s*\|\|\s*(.*?)\s*\|\|\s*(.*?)\s*\|\|\s*(.*?)\s*\|\|/g

Replacement string (sub-bullets):

* $1 / $2\n** '''Capsule Pitch Description:''' $3\n** '''Implementation:''' $4
(Depending on the implementation, you may need to use \1 instead of $1, etc.)

The result looks like this:

Replacement string (multiline, like What an Idiot!):

* $1 / $2\\\\\n'''Capsule Pitch Description:''' $3\\\\\n'''Implementation:''' $4

Replacement string (single line)

* $1 / $2: $3 $4

For this one, we might want to add periods if there aren't already any. To do this, we use this regex:

\|\|\s*(.*?)\s*\|\|\s*(.*?)\s*\|\|\s*(.*?)\.?\s*\|\|\s*(.*?)\.?\s*\|\|\s*(.*?)\s*\|\|

and replace it with

* $1 / $2: $3. $4.

Some slight work might be needed to avoid redundancy with question marks or exclamation points.

Top