List Info

Thread: Help with regular expression




Help with regular expression
user name
2006-11-03 22:10:04
Hi,

I am definitely not a regular expressions person, but need
halp on
parsing a line of text.
I need to get the lat, lon, years, and type values as
outlined in the
text below.  I am using Python to try and parse the line. 
Can anyone
help me with the regular expression that would let me
extract these
values hopefully into an array?  Thanks.

LATT=  67.08 LONG=-157.87 YEARS= 11. TYPE= 1


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to
regex-unsubscribegooglegroups.com
For more options, visit this group at http://grou
ps-beta.google.com/group/regex
-~----------~----~----~----~------~----~------~--~---

Help with regular expression
user name
2006-11-04 02:24:34
I am not familiar with Python, but here is a regular expression that will capture each of the numbers.

LATT=s*(d+(?:.d*)?)s+LONG=s*(-?d+(?:.d*)?)s+YEARS=s*(-?d+(?:.d*)?)s+TYPE=s*(-?d+(?:.d*)?)

Rick Quatro

On 11/3/06, acatejrgmail.com">acatejrgmail.com < acatejrgmail.com">acatejrgmail.com> wrote:

Hi,

I am definitely not a regular expressions person, but need halp on
parsing a line of text.
I need to get the lat, lon, years, and type values as outlined in the
text below.&nbsp; I am using Python to try and parse the line. ; Can anyone
help me with the regular expression that would let me extract these
values hopefully into an array?&nbsp; Thanks.

LATT=  ;67.08 LONG=-157.87 YEARS= 11. TYPE= 1





--
Rick Quatro
585-659-8267
http://www.frameexpert.com
--~--~---------~--~----~------------~-------~--~----~
&nbsp;You received this message because you are subscribed to the Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to regex-unsubscribegooglegroups.com
For more options, visit this group at http://groups-beta.google.com/group/regex
-~----------~----~----~----~------~----~------~--~---

Help with regular expression
user name
2006-11-19 08:14:14
U had luck Rick. This time U were almost perfect


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regexgooglegroups.com
To unsubscribe from this group, send email to
regex-unsubscribegooglegroups.com
For more options, visit this group at http://grou
ps-beta.google.com/group/regex
-~----------~----~----~----~------~----~------~--~---

[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )