I have a text file that I am reading line by line. I am trying to replace the blank spaces with a TAB character. But, I only want to do that after one of the listed Ethnicities is found. The number of spaces that occurs before the ethnicity is variable. Can RegEx accomplish this? Is there another solution if not? Thanks!
;~ ;Parse Ethnicity
Local $iUboundOfFile = _FileCountLines($sFilePath_DataBuild)
For $iCC = 1 To $iUboundOfFile -1
Local $sFileRead_LineBy
So how would I modify the Regex pattern if I want to look for a nine digit string where the first seven characters are digits and the last two are either "LP" or "UP"?
For example:
1018003LP
1016001UP
1031002UP
1015004LP
I was thinking something like this would do the trick, but it's not working.
$sOutPut_AfterStep1 = StringRegExpReplace($sFileRead_LineByLine, "(?i)\h+\b(\d{7}\w{2})\b", @TAB & "\1" & @TAB)
*EDIT:
Actually, that does seem to b