Hi all,
I'm trying to tweak an old profile. The Reg Ex seperates a ConsID (if applicable) from a line of data:
ConsID/AppealID/PacgageID
Please see below:
My team enter the '/' manually (donation form), but i need to replace '/' with either '-' or '_' or '.' .
When I replace the '/' in the codes above, with a Hyphen, the test seems to remove digits from the ConsID.
Can someone point me in the right direction please? I'm sure i'm missing something obvious.
Thanks
Matt
it's because hyphen is a protected character in regex. You have to escape it by putting a backslash in front.
so replace the current slash with \- instead.
Matt Boyce
Hi all,
I'm trying to tweak an old profile. The Reg Ex seperates a ConsID (if applicable) from a line of data:
ConsID/AppealID/PacgageID
Please see below:
My team enter the '/' manually (donation form), but i need to replace '/' with either '-' or '_' or '.' .
When I replace the '/' in the codes above, with a Hyphen, the test seems to remove digits from the ConsID.
Can someone point me in the right direction please? I'm sure i'm missing something obvious.
Thanks
Matt