Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Replace, but ignore certain characters

9 views
Skip to first unread message

Christopher M.

unread,
Jul 29, 2012, 10:17:39 AM7/29/12
to
I'd like to ignore certain characters when I use the replace function.

For instance if I want to replace the phrase:

'said I'

in the phrase:

'Jim said (I farted)'.

In order to do this it seems that I have to ignore the parentheses in 'said
(I'.


W. Pooh (AKA Winnie P.)


Stuart McCall

unread,
Jul 29, 2012, 1:21:21 PM7/29/12
to
"Christopher M." <nospam_...@floo.com> wrote in message
news:Y9adnSN_gPbF24jN...@giganews.com...
Try putting the string into a temp variable, replacing the parens with "",
then do the replace on that.


Christopher M.

unread,
Jul 31, 2012, 3:08:07 PM7/31/12
to
"Stuart McCall" <smc...@myunrealbox.com> wrote in message
news:tieRr.526051$fu5....@fx17.am4...
What I really want to do is ignore formatting, when I do a replace.

Stuart McCall

unread,
Jul 31, 2012, 7:38:42 PM7/31/12
to
"Christopher M." <nospam_...@floo.com> wrote in message
news:memdneBOpsTGs4XN...@giganews.com...
Well presumably you know where the parens should appear in your replacement
string, so once you've stripped them out and done your replace, put them
back in.


Christopher M.

unread,
Aug 1, 2012, 5:21:16 PM8/1/12
to

"Stuart McCall" <smc...@myunrealbox.com> wrote in message
news:g0_Rr.568787$fu5.2...@fx17.am4...
That should do the trick. Thanks.
0 new messages