Announcement

Collapse
No announcement yet.

Programmers please read.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    If you can find something with regex find and replace, use this for the regex.
    (space)*B.*
    * is a wildcard that means "zero or more of the previous character"
    . is a wildcard that means "any character"
    That will match both of those cases.
    American by birth, smarter than the average tropical fruit by the grace of Me. -me
    I try not to break the rules but merely to test their elasticity. -- Bill Veeck | Don't listed to the Linux Satanist, people. - St. Leo | If patching security holes was the top priority of any of us(no matter the OS), we'd do nothing else. - Me, in a tired and accidental attempt to draw fire from all three sides.
    Posted with Mozilla Firebird running under Sawfish on a Slackware Linux install.:p
    XGalaga.

    Comment


    • #17
      Just expot it into Access,
      write a small VBA Solution and then reconvert it into Text

      If it is in a compatible Format to convert it (i.e. all Fields are separated, for example by Commas or by Tabs) there should be no Problem
      Tamsin (Lost Girl): "I am the Harbinger of Death. I arrive on winds of blessed air. Air that you no longer deserve."
      Tamsin (Lost Girl): "He has fallen in battle and I must take him to the Einherjar in Valhalla"

      Comment


      • #18
        Hold that..........I can see how 2 separate replace "(space) with " can solve the problem for the main 2 cases. I can also see now that removing all spaces with find and replace is easy (I didn't think before it woudl work).

        If there is a more complex problem I'll bug Geeslaka.

        Cheers all.

        Doc
        Last edited by DrSpike; September 1, 2003, 13:43.

        Comment


        • #19
          * waits to be bugged *
          It's the monday after Labor Day so I have no school and lots of better things to do that need ignoring.

          Edit: typo
          Last edited by geeslaka; September 1, 2003, 14:17.
          American by birth, smarter than the average tropical fruit by the grace of Me. -me
          I try not to break the rules but merely to test their elasticity. -- Bill Veeck | Don't listed to the Linux Satanist, people. - St. Leo | If patching security holes was the top priority of any of us(no matter the OS), we'd do nothing else. - Me, in a tired and accidental attempt to draw fire from all three sides.
          Posted with Mozilla Firebird running under Sawfish on a Slackware Linux install.:p
          XGalaga.

          Comment


          • #20
            Well I've finished for the day now. I'll check tomorrow and see if I need a "clever" solution. Right now I think the blunt method will work. I had no idea find and replace would recognise and remove (space) without any unwanted side-effects, which of course there would be in a normal setting - I was envisaging doing a find and replace for each separate code.

            And I said "bug". There are other people around here who can help you with your other problem.

            Comment


            • #21
              Dr. Spike

              If you need to remove leading spaces only, then you will need to install some more software on your machine. There are a number of choices:

              1) Emacs for PC
              2) Perl or some other scripting language (one of us can send you an appropriate script to run)
              3) Customer program (one of us can write a simple program and compile it to a windows executable and send it to you - this may require installation of a dll too).
              “It is no use trying to 'see through' first principles. If you see through everything, then everything is transparent. But a wholly transparent world is an invisible world. To 'see through' all things is the same as not to see.”

              ― C.S. Lewis, The Abolition of Man

              Comment


              • #22
                Open file in Word, select all, turn into list, turn list off again... Tadaa! All leading spaces are gone.

                Or get a decent program that can do regular expressions.

                Edit: major crosspost, and I didn't see there was a quotation mark before it... oh well
                Last edited by Mercator; September 1, 2003, 14:35.
                Civilization II: maps, guides, links, scenarios, patches and utilities (+ Civ2Tech and CivEngineer)

                Comment


                • #23
                  Spike: What you are looking for is just one line of code. I would ship it off to geeslaka, because of what pchang mentions. It shouldn't take him but 5 minutes to do.
                  I came upon a barroom full of bad Salon pictures in which men with hats on the backs of their heads were wolfing food from a counter. It was the institution of the "free lunch" I had struck. You paid for a drink and got as much as you wanted to eat. For something less than a rupee a day a man can feed himself sumptuously in San Francisco, even though he be a bankrupt. Remember this if ever you are stranded in these parts. ~ Rudyard Kipling, 1891

                  Comment


                  • #24
                    As I said thanks all, but I think I can use MtG's suggestion. If I need something more clever I will ask one of the people who have kindly offered to help out.

                    Comment


                    • #25
                      In order of preference:

                      1. Perl, awk or any similar tools that support regex
                      2. BASIC (nice built-in string handling capabilities)
                      3. Turbo Pascal/Delphi/Klylix (very handy, not quick-and-dirty for this situation, though)
                      (\__/) 07/07/1937 - Never forget
                      (='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
                      (")_(") "Starting the fire from within."

                      Comment


                      • #26
                        If you are interested, you can investigate Cywin for future uses
                        (\__/) 07/07/1937 - Never forget
                        (='.'=) "Claims demand evidence; extraordinary claims demand extraordinary evidence." -- Carl Sagan
                        (")_(") "Starting the fire from within."

                        Comment

                        Working...
                        X