Skip to content

Intellij Idea regular expression search and replace

March 16, 2007

Recently I wanted to turn some URL parameters into a table for a document. Here’s how you can do this very quickly with Idea.

First turn the & symbols into CR’s.

Regular expression replace example 1

Next convert name-value pairs into tr and td declarations.

Regular expression replace example 2

Easy!

Advertisements

From → Technical

One Comment
  1. Thanks for this, the regex syntax to replace using a matched group isn’t in the IDEA docs!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: