augustorusso 1 Posted June 7, 2016 Report Share Posted June 7, 2016 Hello guys, i'm having some problems when trying to get some numbers from a text using regex, this is the text: N/ICompanySearch Main SearchReset SearchInitial RegistrationExcel LawsuitPdfExcel ConsolidatedAlter ColumnsSort Column(1 of 151)pp12345678910pp50100150 ID Lawsuit Number Company Party Opposing Party State External ID File Plaintiff Defendant District Court i'm trying to capture (1 of 151) using this regular expression: \(([0-9]?){3} of ([0-9]?){3}\) The funny part is that when I use the regex editor to test, it works correctly, but not when i run the code using the function $find regular expression. Quote Link to post Share on other sites
pash 504 Posted June 7, 2016 Report Share Posted June 7, 2016 try alert($find regular expression("N/ICompanySearch Main SearchReset SearchInitial RegistrationExcel LawsuitPdfExcel ConsolidatedAlter ColumnsSort Column(1 of 151)pp12345678910pp50100150 ID Lawsuit Number Company Party Opposing Party State External ID File Plaintiff Defendant District Court","\\(\\d+ of \\d+\\)")) 1 Quote Link to post Share on other sites
augustorusso 1 Posted June 7, 2016 Author Report Share Posted June 7, 2016 it worked pash, thank you very much ! i'm using like this: set(#Pag2,$find regular expression(#Pag,"\\(\\d+ of \\d+\\)"),"Global") so i can reuse the result Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.