Skip to main content
November 22, 2017
Question

Wildcards, to trim large quantities of data.

  • November 22, 2017
  • 1 reply
  • 417 views

Hello everyone,

My name is Terry, and I am trying to use DW CS6 to trim out large pieces of data on a game file, leaving behind a small section. Below is an example.

  <Technology Name="TechG01" Cost="30" IsUnique="true" X="-1.5" Y="1.5" Category="GalacticWarfare">

    <Descriptors />

    <PathsPrerequisites></PathsPrerequisites>

    <TechnologiesPrerequisites></TechnologiesPrerequisites>

    <TechnologiesDependencies></TechnologiesDependencies>

    <Unlockable Name="ModuleWeaponLaserFake1" Access="Fake" />

    <Unlockable Name="ModuleWeaponLaser1SR" Access="Hidden" />

    <Unlockable Name="ModuleWeaponLaser1MR" Access="Hidden" />

    <Unlockable Name="ModuleWeaponLaser1LR" Access="Hidden" />

    <Unlockable Name="ModuleDefenseShield1" Access="Standard" />

    <Gui>

      <Title>%TechG06Title</Title>

      <Description>%TechG06Description</Description>

      <Icon Small="Gui/DynamicBitmaps/Technologies/TechnologyG06Small"/>

    </Gui>

  </Technology>

  <Technology Name="TechG02" Cost="30" IsUnique="true" X="1.5" Y="1.5" Category="GalacticWarfare">

    <Descriptors />

    <PathsPrerequisites></PathsPrerequisites>

    <TechnologiesPrerequisites></TechnologiesPrerequisites>

    <TechnologiesDependencies></TechnologiesDependencies>

    <Unlockable Name="ModuleWeaponMissileFake1" Access="Fake" />

    <Unlockable Name="ModuleWeaponMissile1SR" Access="Hidden" />

    <Unlockable Name="ModuleWeaponMissile1MR" Access="Hidden" />

    <Unlockable Name="ModuleWeaponMissile1LR" Access="Hidden" />

    <Unlockable Name="ModuleDefenseAntimissile1" Access="Standard" />

    <Gui>

      <Title>%TechG07Title</Title>

      <Description>%TechG07Description</Description>

      <Icon Small="Gui/DynamicBitmaps/Technologies/TechnologyG07Small"/>

    </Gui>

  </Technology>

I am trying to use the wildcard function to select from the first [Cost="] down to the next [<Technology name="] leaving behind the [Tech***] parts. This has a few hundred entries, so any advice how to do this would be much appreciated.

I have tried using: .* - [^"]* - [^>]* - ([^<]*) with regular expression enabled and disabled.

Thank you kindly.

Regards,

TjStorm (Terry)

This topic has been closed for replies.

1 reply

B i r n o u
Legend
November 23, 2017

what do you mean the cost attribute is after the name attribute... so you want to select from the cost attribute, until the next name attribute ?

what is the final aim ?

November 23, 2017

So what I want left behind would be thus (after deleting the first <Technology Name="

TechG01

TechG02

TechG03

TechG04

TechG05

TechG06

B i r n o u
Legend
November 24, 2017

I still miss understand, what you expect.. do you want to extract the name attribute of the TECHNOLOGY tab ?