Forum Discussion
RecycleBin_Rob
Oct 09, 2024Copper Contributor
Extract Address from Cell Text
Background: I'm working with address data that uses the quadrant system (ends with NW, NE, SW, or SE). There are only very few instances where it ends with N or S. I have a column of data that...
PeterBartholomew1
Oct 12, 2024Silver Contributor
Playtime! OK, I confess this is not my forte, but here is a start at a regular expression but with the regex hidden.
all and compassPts are just defined names that return text. PosLookAhd is a Lambda function.
posLookAhd = LAMBDA(x,"(?=" & x & ")" )
Such a function is not exactly in the spirit of REGEX! ... but kind of fun.
SergeiBaklan
Oct 16, 2024Diamond Contributor
Perhaps we may simplify to
= REGEXEXTRACT( source[Text], "(?xi) (.*\b( (n|s)?(w|e) | (n|s) )\b) | (.*)" )- PeterBartholomew1Oct 16, 2024Silver Contributor
I hadn't come across the case-insensitive modifier but then, there is much else that I haven't come across!