Sign in to follow this  
Followers 0
JRowe

Regular expressions question

2 posts in this topic

#1 ·  Posted (edited)

Interesting RE problem here.

I need to write a RE that will update a list of 523 distinct variables. Basically this is just a search an replace for equivalent data.

CODE
h

v

N

NA

A

AN

Ah

p

hN

t

hA

ti

NV

it

Nh

pN

Nt

VA

N!

NAv

Av

pA

NVv

ht

NAt

Np

!

i

!N

r

CN

ANh

Vt

Nti

tN

hiN

AvV

ANv

AvtN

NC

iN

hit

VN

ph

NVA

hi

pNA

hti

!NV

hA!

hAti

Ai

DNVP

Avh

hv

vP

tNV

tV

At

Vti

tA

Vit

iV

PvA

NiV

PvNA

tiA

Ni

AVt

ANVt

VtN

tiV

AvN

NVt

Vi

NtV

Nit

VtA

iA

NAtV

iNV

VNA

NitV

p!

tNA

VAvN

itV

VtiNA

NVi

tiN

Pv

vPC

PvCA

vAN

ANVtv

tiNV

VtiN

DNA

NVtA

!v

C

ANtV

ivVA

DvNA

hAv

VitAN

Cv

DCN

DrNA

ANv!

NVti

DA

NtiVA

DvA

rN

rNv

ANt

NtVA

NtAV

AVti

CPNv

vPA

VtNA

VAv

ViN

VitNA

hiv

!h

rvN

NAtiV

A!

vAN!

VitN

NAvV

Vth

Vih

NvtVA

pAN

ANvV

NtiV

Ar

itNV

p!V

AVNt

NVtiv

NAVtP!

AtV

hNt

tVN

VtNi

NitVA

tAV

NA!

NitAV

CPv

htiV

NPvA

AvNtV

AvNVt

PvN

NAvVt

NDA

v!

NVit

AvNV

itA

NAi

N!Vt

AvViN

tNAvV

Vith

Vtih

NtivV

ANVi

!VN

NVAt

DCA

tN!V

VANt

pAh

AVi

VtiN!

ihV

hVi

Vh

NViA

NtA

VitNAv

NvVA

NAVt

N!A

thV

NVt!

NVA!

hVt

NAti

ViNA

NAitV

CPvN

VNt

NiA

Nt!V

VtAN

vDA

NAvtV

ViN!t

NAiV

itAV

NtvV

ih

th

AVtvN

AtivNV

ViNt

itN

VtiAvN

Vv

NVAv

VtivAN

NVtiA

Vt!

Vitv

p!N

VtiAN

PvC

NV!

Nt!VA

ViA

NvAVt

ANtiV

NrtiV

NitVv

Ne

NtiAV

tVA

NAviV

VANv

NtAVi

Ap

NA!V

tiNA

pt

thVA

VtihA

NV!vA

tNAV

!AvNV

!vA

VN!Av

ViN!Av

vhA

A!Nv

ViAN

VitA

NAVi

PNt

itNA

pVitN

vC

Ati

!Av

V!A

ANivVt

hVv

PvtiNVA

VNi

tNVA

VtNiA

VNti

iVN

AVtNv

NVtAv

ANVti

Ait

iNVA

DCv

AVit

tANV

iAN

!A

!NtV

CP

tiAV

PCtiV

PC

tANvV

NPA

AiNV

AviNV

ANt!V

Av!iNV

VNtiA

N!i

NiVt

NtVAv

vVA

AvNVi

iNtV

ViNv

VtNAv

ANvPC!

iAV

ANVtiv

VAtN

AvVtN

NAVti

ViNp

VN!

Av!iN

N!itV

AvNtiV

vAtV

NVth

AtNV

i!V

V!h

Vti!

VAt

AtN

itNAV

VtN!i

AN!v

NiVt!

NDAv

N!ViA

VNit

itvV

N!iV

rN!

NvVt

AvN!

VtN!

Cv!

rD

Dr

NVti!

NAvVti

ViN!

NvAi

VN!t

rA

tiANV

PvAN

NPAv

iNA

VNv

NVtv

D

!it

tNiV

ithV

hNA

tAhV

NVitA

NviV

tihV

DvAN

DvPNA

NAVvi

APvCNtV

NtAiV

iNAV

DAvN

VtAv

ANviV

rNvV

AtiNV

ANti

N!VtA

i!NV

V!N

ANP

rDNV

ANi

Vtiv

D!

ND

rvA

NvP

PvVNA

hPA

AvP

!Nt

vNDA

PCv

vCN

A!p

AViN

vCNA

AVitN

ANPv

NCPA

DrvA

CvAr

vP!NtiVA

tAvPV

PAvN

tiAN

VtiA

tiNVA

DtVA

NtiPV

AViNt

v!t

NvVitA

AVtiN!

ANvP

VtiNvA

DP

vNVt

hAi

htA

vVN

NivV

NDv

NV!v

VN!v

NtVi

htNv

VitNv!A

NtivVA

ANit

vPNA

h!

VtANi

NtPV

VAi

NitA

AiV

N!V

AvNV!

VAh

ANPvVt

NAvP

AiN

tiNPCV

ANPC

VvN!

AtvV

NtViA

ANtvV

VtNv

NCA

NrA

VvAN

pi

VNtA

NAit

AVNi

vCP

ANVit

NiVA

VtiNv

AvVN

VitNv!

iNVt

itNVA

htN

tNiVA

vCrA!N

NVitAv

hiNA

AVvN!

AhV

iNt

NvVtA

Nr

pNV

NvitVA

p!vN

N!ti

DCvr

Dv

rp

vrN!

CvN

PAv

hitN

VNAPv

CPVtN

ht!

Nt!

VNvA

!NtiV

APN

vViN

NtiA

VvtiNA

NAD

tip

AtNVv

!Ni

DN

!iNV

hNit

NVvPA

vAtNV

NAP

vAhV

hvN

ANitV

vVNA

NAVit

ANiV

vA!NV

Dvr!

rDA

vCrN

vr

vrCN

rv

Cvr

Nrv

Cr

CNPt

AitNV

AitN

N!AV

vCN!

!i

DAv

NAvtiV

N

[edit]

I changed my tack... I still have the text file, and was wondering if there were a quick way to set equivalent values to unique designations.

Edited by jrowe

Share this post


Link to post
Share on other sites

No quick way out of this one. I'm going through and doing search and replace, since it was badly formatted to begin with, at least for my purposes. ;) Thanks for looking, anyway!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0