4 May 2011 18:46
regex match
Hello! (Sheri?) I am trying to regex something. I want to find this single phrase in an entire file, so I readall the file and use this here regex to find it: local whatversionpat = regex.pcrecompile(?~(?im-sx)(?<=const\s+versionnumber\$\s+=\s+")\d+\.\d+(?=")~) -------Here is part of the file: $source $GENFREE $ACCELERATOR CalcKeys Raw CalcKeys AS HACCEL GUI "TreasureCalc", pixels, icon, 100 const blatdll$ = appexepath$ & "blat.dll" Declare Function BlatSend Lib "blat.dll" Alias "Send" (ByVal sCmd As String) As Integer const VersionNumber$ = "2.5" 'Monday, May 1, 2011 'pieces of strings to assemble for email -----I am trying to find this: const VersionNumber$ = "2.5" ----and grab into a variable, only this 2.5 My regex is close, I think, but needs something. I appreciate any help! ------------------------------------(Continue reading)
RSS Feed