Send to a Friend

joshuav's avatar

I have a text file, and i want to replace P(blah) with P[blah], everywhere that it exists?

Asked by joshuav (17points) July 16th, 2009

importantly, the “blah” between the paren are often different, and of different lengths. sometimes, they include even other pairs of parens. for instance, i might have something like, P(X(t), Y(t)), and also something like P(X(t)). i would like some code that automatically replaces only the OUTER paren with square brackets. thanks.

Using Fluther

or

Using Email

Separate multiple emails with commas.
We’ll only use these emails for this message.