View Single Post
Old 02-03-2025, 10:25 PM   #6
gurcha
Junior Member
gurcha began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Aug 2023
Device: Kindle
My replies are not showing for me, so forgive me if this comes up 5 times...

Thanks for coming back to me. I am not at all experienced with REGEX, so some of your language is a little confusing for me.

I have just tried the following:

Search for: (.+?),{,2}

when you say i need to match the end of the string, does that mean i need to change {,2} to {,?} where ? is however many different types of id's i have?
i.e. if i have 4 id's the regex would be - (.+?),{,4}

or i need to add an additional expressions for each additional ID - i.e. if i had 4 id's to copy over the full regex would be:

(.+?),{,2},{,3},{,4}

Replace with:

,\2 - doesnt work - says 'no such group'

\2 - doesnt work - says 'no such group'

\1 - doens't put the commas in

,\1 - puts a comma after every character in the test results, but actually does the same as \1 - it copies over the data but without the commas

I thought there would just be a simple copy everything exactly as it is in the source field, but alas, that doesn't seem to be the case.

I really appreciate you working on this with me, if you have any other ideas, i will certainly try them...

While i am at it, you don't happen to know if there is an expression that will alphabetise a field? For instance, if my Identifier field were all in the same alphabetical order, it might make my life a little easier if i have to manually add this stuff back

e.g:
google:Kh4Etd_swwkC,isbn:9780822211266,amazon:0822 211262,goodreads:2403970

would become

amazon:0822211262, goodreads:2403970, google:Kh4Etd_swwkC, isbn:9780822211266

Thanks again
gurcha is offline   Reply With Quote