Case-sensitive replace string?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Case-sensitive replace string?

4D Tech mailing list
I find myself needing to do a case-sensitive replace string.

Searching for: ID
Replacing with _ibid

The character pair "id" or "Id" or "iD" should be left alone.

So

PlaceID = Place_ibid
Placeid = Placeid
PlaceId = PlaceId
PlaceiD = PlaceiD

Does anyone already have a routine to help out with this in 4D? Or, for
that matter, have I missed a command or option that's been added down the
years?

Thanks!
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Case-sensitive replace string?

4D Tech mailing list
Use Replace string with a *

$text:=Replace string("A test ofUC";"uC";"--";*)
ALERT($text) -> "A test ofUC"

Keith - CDI

> On Jul 29, 2017, at 12:30 PM, David Adams via 4D_Tech <[hidden email]> wrote:
>
> I find myself needing to do a case-sensitive replace string.
>
> Searching for: ID
> Replacing with _ibid
>
> The character pair "id" or "Id" or "iD" should be left alone.
>
> So
>
> PlaceID = Place_ibid
> Placeid = Placeid
> PlaceId = PlaceId
> PlaceiD = PlaceiD
>
> Does anyone already have a routine to help out with this in 4D? Or, for
> that matter, have I missed a command or option that's been added down the
> years?
>
> Thanks!
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Case-sensitive replace string?

4D Tech mailing list
Yikes. Didn't know that...it means that I've been using the * wrong for
years. Ouch. Yup, it's right there in the docs.

Thanks for straightening me out.
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************