Trying to import event IDs, but the platform we're using won't allow multiple entries with the same ID.
Thus I'm wanting to take something that'd turn both "EVENTID1718/A" and "EVENTID1718/B" into plain "EVENTID1718".
Not every ID will have that sort of suffix, but I can change what the split is if needed.
Suggestions?
Best Answer
R
Ricky Tillson
said
almost 5 years ago
This is assuming that your string is always alphanumeric and a forward slash always be the delimeter. If so you could use some regex that looks something like this:
Replacement values: $1 Value to match on: (\w+)\/(\w+)
This looks for any length alphanumeric string split by a forward slash. It then returns only group 1; everything before the slash
This is assuming that your string is always alphanumeric and a forward slash always be the delimeter. If so you could use some regex that looks something like this:
Replacement values: $1 Value to match on: (\w+)\/(\w+)
This looks for any length alphanumeric string split by a forward slash. It then returns only group 1; everything before the slash
1 person likes this
J
John Franglen
said
almost 5 years ago
The string will always be alphanumeric, and basically the delimeter is whatever I want it to be, as all our digital team need is that they can put a different ID in for each event, so /A /B /C etc seemed the easiest way of giving them that but letting me easily remove it.
Just checked it and it looks like it works, thank you very much!
John Franglen
Trying to import event IDs, but the platform we're using won't allow multiple entries with the same ID.
Thus I'm wanting to take something that'd turn both "EVENTID1718/A" and "EVENTID1718/B" into plain "EVENTID1718".
Not every ID will have that sort of suffix, but I can change what the split is if needed.
Suggestions?
Replacement values: $1
Value to match on: (\w+)\/(\w+)
This looks for any length alphanumeric string split by a forward slash. It then returns only group 1; everything before the slash
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstRicky Tillson
Replacement values: $1
Value to match on: (\w+)\/(\w+)
This looks for any length alphanumeric string split by a forward slash. It then returns only group 1; everything before the slash
1 person likes this
John Franglen
The string will always be alphanumeric, and basically the delimeter is whatever I want it to be, as all our digital team need is that they can put a different ID in for each event, so /A /B /C etc seemed the easiest way of giving them that but letting me easily remove it.
Just checked it and it looks like it works, thank you very much!
Best,
John
-
Dictionary Issue- RegEx to translate dollar amount to specific letter code
-
Preventing IoM from importing Blank Attributes
-
Dictionary default United States?
-
How to not add a gift attribute if the import cell is blank
-
RegEx to remove leading characters
-
Credit Card type Dictionary
-
Regular Expression to pull a specific word or string from a longer string
-
Object reference not set to an instance of an object Error
-
Event Participant importing question
-
Date Dictionary Help: YYYYMMDD to MM/DD/YYYY
See all 1190 topics