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?

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.

Topics: , ,

Using Fluther

or

Using Email

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

Mobile | Desktop


Send Feedback   

`