Hi folks,
Which is the best way to extract the numbers of the following string ?
HELP, /MEM, OUTPUT=str
PRINT, str
I'm trying something like:
str_out=STREGEX(str,'[0-9]*',/EXTRACT)
But nothing happens...
Any suggestions ? Thanks in advance,
nata
|
|
0
|
|
|
|
Reply
|
nata
|
2/22/2011 7:08:32 PM |
|
On 2/22/11 12:08 PM, nata wrote:
> Hi folks,
>
> Which is the best way to extract the numbers of the following string ?
> HELP, /MEM, OUTPUT=str
> PRINT, str
>
> I'm trying something like:
> str_out=STREGEX(str,'[0-9]*',/EXTRACT)
>
> But nothing happens...
> Any suggestions ? Thanks in advance,
Try using + instead of *:
IDL> print, str
heap memory used: 1302373, max: 1305378, gets: 1518, frees:
609
IDL> print, stregex(str, '[0-9]+', /extract)
1302373
Also, check out the MEMORY function.
Mike
--
www.michaelgalloy.com
Research Mathematician
Tech-X Corporation
|
|
0
|
|
|
|
Reply
|
Michael
|
2/22/2011 7:46:42 PM
|
|
|
1 Replies
683 Views
(page loaded in 0.021 seconds)
Similiar Articles: Extract numbers from text string - comp.lang.idl-pvwaveHi folks, Which is the best way to extract the numbers of the following string ? HELP, /MEM, OUTPUT=str PRINT, str I'm trying something like: ... Fw: extracting numbers from a string - comp.soft-sys.sas ...Extract numbers from text string - comp.lang.idl-pvwave Fw: extracting numbers from a string - comp.soft-sys.sas ... If job numbers ALWAYS look like that (ie. two digits ... extracting Nunbers from string - comp.soft-sys.matlabFw: extracting numbers from a string - comp.soft-sys.sas ... How to extract single int digits from a String - comp.lang.java ... Extract numbers from text string - comp ... extract phone numbers from text field - comp.databases.filemaker ...Extract numbers from text string - comp.lang.idl-pvwave I have a job database with job numbers entered into a text string field. My goal is to extract just the numbers out ... extract last 4 numbers from zip code - comp.soft-sys.stat.spss ...Extract numbers from text string - comp.lang.idl-pvwave Extract all text to left of ... numbers from zip code - comp.soft-sys.stat.spss ... extract phone numbers from text ... how to extract from strings - comp.unix.programmerExtract numbers from text string - comp.lang.idl-pvwave Hi folks, Which is the best way to extract the numbers of the following string ? HELP, /MEM, OUTPUT=str PRINT, str ... extract a specific substring - comp.lang.awkExtract numbers from text string - comp.lang.idl-pvwave extract a specific substring - comp.lang.awk If you want a count of a certain ... Fw: extracting numbers from a ... Extract Program change number formula - comp.music.midiExtract numbers from text string - comp.lang.idl-pvwave Extract Program change number formula - comp.music.midi Extracting numbers from alphanumeric strings - Excel ... extracting a particular pattern form a string - comp.unix ...Can I extract everything to the left (or maybe copy the whole line and ... Extract numbers from text string - comp.lang.idl-pvwave Extract all text to left of comma ... extract parts of file - newbie - comp.lang.perl.miscExtract numbers from text string - comp.lang.idl-pvwave Hi folks, Which is the best way to extract the numbers of the following string ? HELP, /MEM, OUTPUT=str PRINT, str ... Extract Number from Text String. Get Numbers From Alphanumeric ...Extract Number from Text Strings in Excel. Get Numbers From Alphanumeric Text in Microsoft Excel Extracting numbers from alphanumeric strings - Excel - Office.comText The text string containing the characters you want to extract. Start_num The position ... As mentioned above, the numbers stored as text in the alphanumeric string ... 7/22/2012 5:02:36 PM
|