As a simpler alternative to stripping out the prefixes and suffixes in the extension code (which is not possible in the commercial, encoded version unfortunately), I figured out how to match full address fields so that "52 N. Main St." is matched with "201 S. Main St."
The answer is SOUNDEX in php; SOUNDS LIKE in mysql.
A sample query for this avatar matrix/gallery extension:
[code:1]SELECT
c.avatar,
c.user_id,
c.address,
u.id,
u.username,
u.name
FROM
#__comprofiler AS c,
#__users AS u
WHERE
c.avatarapproved = '1'
AND c.avatar NOT LIKE 'NULL'
AND c.banned = '0'
AND c.confirmed='1'
AND (c.user_id = u.id)
AND c.address SOUNDS LIKE '[value]'
ORDER BY RAND()[/code:1]
In the above example, I'm not sure if the 'S.' would trip up the match with 'N. Main' or not.
Would REGEXP be useful here?
The simple goal is to identify people who live on the same street.
The ideal, more complicated goal is to identify people who live on the same block, or within a certain range of blocks on the same street. (Getting more complicated, take into account adjacent cross streets.)