help with Find and Replace

For all things Mellel

Moderators: Eyal Redler, redlers, Ori Redler

Post Reply
DanZac
Knows everything, can prove it
Posts: 148
Joined: Fri Dec 21, 2007 2:45 pm

help with Find and Replace

Post by DanZac »

I haven't used the find and replace dialogue too much and I'm not even sure if what I want to do is possible.

I need to find occurrences of a word that are ALWAYS followed by space and then a digit, and replace JUST the word, not the space and digit.

So,

Matt 12.1 needs to be replaced with Mt. 12.1

But the digits will always be different, so I would use the digit element. Can I tell Mellel to leave the digit it finds?
DanZac
Knows everything, can prove it
Posts: 148
Joined: Fri Dec 21, 2007 2:45 pm

Re: help with Find and Replace

Post by DanZac »

Figured it out. About the only thing I want to say is that the Mellel Guide isn't particularly helpful for this
rpcameron
Knows everything, can prove it
Posts: 980
Joined: Wed Oct 26, 2005 12:48 am
Location: IE, CA, USA

Re: help with Find and Replace

Post by rpcameron »

DanZac wrote:Figured it out. About the only thing I want to say is that the Mellel Guide isn't particularly helpful for this
I'm curious, how were you able to do this? I tried constructing a FindSet that I thought would do, but it didn't find my test string.

I'd assume a regex would be:

Code: Select all

[a-zA-Z]+(\ \d)
Ah, after fiddling a bit in Mellel to make the FindSet mirror my regex, I was able to accomplish what you did. It's a bit awkward in Mellel, but it seems to mirror the regex pretty well. Glad you were able to figure it out. For those wondering, I came up with:
Image
— Robert Cameron
donb
Knows everything, can prove it
Posts: 326
Joined: Thu Oct 20, 2005 7:43 am

Re: help with Find and Replace

Post by donb »

I try to deal with such issues in my Beginners Tutorial for Mellel, in the find and replace chapter. I'd appreciate your taking a look at that, and letting me know if the explanation of the method proves to be unsatisfactory.

Don Broadribb
Post Reply