Jump to content


Photo

Search and Replace - Regular Expressions?


  • Please log in to reply
6 replies to this topic

#1 bdunn

bdunn

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts

Posted 25 January 2019 - 03:43 PM

I think it would be great to have a checkbox on the Search and Replace box to allow for REGEX (Regular Expressions) searches. I will link to more information about REGEX at the bottom.

 

Here's a perfect example of how it could make work so much easier. I have a WHOLE lot of places that start "Of England" or "of Lancashire, Eng." and all that. We've all seen those stuck in places. Well, if I could search for the string "^of " and replace it with nothing then all of the places that START with "of" and that ONLY start that way would be removed in one go. That's just a simple example but would save a ton of time.

 

Here's more about REGEX. (It's a standard programming tool)

https://en.wikipedia...#Basic_concepts

 

It may seem hard to implement that, but I bet there is a library that would make that much simpler. I'm not sure how RootsMagic was written. Delphi?

 

Thanks!



#2 Renee Zamora

Renee Zamora

    Advanced Member

  • Support
  • PipPipPip
  • 8474 posts

Posted 25 January 2019 - 05:01 PM

Did you try using Search>Search and Replace>Places with these settings:

Search for: of [leave a space afterwards]

Replace with: [leave this blank]

 

The "of " will help it identify that its not part of a place name but a prefix to another place. 


Renee
RootsMagic

#3 bdunn

bdunn

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts

Posted 26 January 2019 - 10:34 AM

Yes, but there are a whole lot of "Isle of ", "City of ", etc. to go through. With regular expressions, searching for ^of would find only those places starting with "of", but that's just one example. This could be used in a whole lot of ways. For example, you could easily correct a lot of errors quickly with the correction expression in REGEX that would only return exactly what matches and often where you want it matched.

 

Here is a simplified cheat sheet for regular expressions:

https://medium.com/f...es-649dc1c3f285

 

If this could be added as a module without a huge amount of work, I think the developers would see the reasoning and power behind being able to search for regular expressions.

 

Thanks for considering.



#4 TomH

TomH

    Advanced Member

  • Members
  • PipPipPip
  • 6255 posts

Posted 26 January 2019 - 10:41 AM

Delphi. And it has been on the Wish List for around 9 years.

Tom user of RM7550 FTM2017 Ancestry.ca FamilySearch.org FindMyPast.com
SQLite_Tools_For_Roots_Magic_in_PR_Celti wiki, exploiting the database in special ways >>> RMtrix-tiny.png app, a bundle of RootsMagic utilities.


#5 bdunn

bdunn

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts

Posted 27 January 2019 - 12:37 PM

Heh... I guessed Delphi just from the look of the UI. I have no idea why. Thanks!

 

If RM8 is a complete rewrite of RM, I wonder if they will still be using Delphi. That seems to have fallen out of favor so I'm sure the libraries available aren't that great. Given that RM8 may run natively on MacOS I would have to assume they also switched from Delphi. Looks like Embarcadero owns the Delphi stuff now. Their web page doesn't pull up anymore. :-(



#6 mjashby

mjashby

    Advanced Member

  • Members
  • PipPipPip
  • 182 posts

Posted 27 January 2019 - 01:30 PM

Sorry, but it seems your knowledge of Delphi and its use for the production of cross-platform applications is a little out of date. See: https://www.embarcad...products/delphi


MJA

"A Mac User with Windows Tendencies"


#7 bdunn

bdunn

    Advanced Member

  • Members
  • PipPipPip
  • 42 posts

Posted 27 January 2019 - 10:47 PM

Well, I was really thinking about the availability of libraries. It has lost popularity over the years:

 

https://www.tiobe.com/tiobe-index/

 

I am surprised how well it handles cross-platform development.