Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 206597
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T17:39:37+00:00 2026-05-11T17:39:37+00:00

This is a followup to an earlier question ( Help Refining RegEx ("\b\d{6}([ ]{1,15})\d{7}\b")

  • 0

This is a followup to an earlier question (Help Refining RegEx ("\b\d{6}([ ]{1,15})\d{7}\b")). The goal is to get the Lat/Lon from the file. This is denoted by an L or the pattern of 6d/7d. I incorrectly stated that there could not be an alpha between start of the Lat (305455) and the Lon (1025446). When I implemented the proposed Regex everything was great till I hit this file. Notice that ‘6770G37 contains an alpha and broke the pattern or that it had 6 digits and restarted the pattern. Not good enough with Reg Ex to figure it out. Here are three different patterns that I need to find. Thanks!

I  FST E  030                                                       66686500    
    L  305455                                              '6770G37 66686501    
       1025446                                             '6770G37 66686502    
    O  ZCA/999                                                      66686503    
    H  05                                                           66686504    

I  ARA                                    '* ACADIANA  AIRPORT         29865996    
            L    300216                               '2425     29865997    
                 0915302                              '2425     29865998    
            S    MSY                                            29865999   

I JENNA078033 ' ZFW L 322823 0923754 ' ZFW

(Transferred from deleted answer)

This is a followup to Gishu’s answer, but could not get the comments area to format well enough. The Regex he proposed L\s*(\d{6})\s*(?:'.*\n)?\s*(\d{7}) worked for several of the possibilities, but failed on this pattern using the .Net engine with multi-line option turned on.

The goal is to capture the Lat 322441 and the Lon 0994055.

Returned Match:

L  322441                                             '1325     66685780 

Sample data…..

I  ABI E   018                                                          66685779    
        L  322441                                             '1325     66685780    
           0994055                                            '1325     66685781    
        O  ZCF/999                                                      66685782    
        H  05                                                           66685783    

Thanks again guys!


This is a followup to Gishu’s answer, but could not get the comments area to format well enough. The Regex he proposed L\s*(\d{6})\s*(?:'.*\n)?\s*(\d{7}) worked for several of the possibilities, but failed on this pattern using the .Net engine with multi-line option turned on.

The goal is to capture the Lat 322441 and the Lon 0994055.

Returned Match:

L  322441                                             '1325     66685780 

Sample data…..

I  ABI E   018                                                          66685779    
        L  322441                                             '1325     66685780    
           0994055                                            '1325     66685781    
        O  ZCF/999                                                      66685782    
        H  05                                                           66685783    

Thanks again guys!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T17:39:37+00:00Added an answer on May 11, 2026 at 5:39 pm

    See if this one works.. L\s*(\d{6})\s*(?:'.*\n)?\s*(\d{7})

    string sText = @" ..." // all the different patterns you posted. I think I have 4
    Regex regex = new Regex(@"L\s*(\d{6})\s*(?:'.*\n)?\s*(\d{7})", RegexOptions.Multiline);
    foreach (Match everyMatch in regex.Matches(sText))
    {
      Console.WriteLine("L {0}, {1}", everyMatch.Groups[1], everyMatch.Groups[2]);
    }
    

    Outputs:

    L 305455, 1025446
    L 300216, 0915302
    L 322823, 0923754
    L 322441, 0994055
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For context, this is a followup to an earlier question . Rather than digging
This is a followup to the question I asked here: Class Hierarchy - Data
This is a followup question to this Should I stick with the Try/Catch/Finally construct,
A bit of a followup from a previous question . As I mentioned in
As a followup to Setting javascript defineGetter and defineSetter in a loop I'm now
This is Delphi 2009, so Unicode applies. I had some code that was loading
I'm having a difficult time expressing this problem, so bear with me and please
I was interested in writing some home-brew analytic solutions and all the click tracking
I'm well aware that a Double has only so many bits of precision, but
I'm trying out the new LightSwitch beta 1 and getting the following error when

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.