I want to search through 250 files with a program which supports regex but I don’t know how to build the query.
This is an example file:
//////////////////////////////Crown Area Effects///////////////////////////////
// Super Spies
DbAreaEffectInfo SuperSpies
{
name = text_carea_sprspies_name
desc = text_carea_sprspies_desc
effects = [
// scale sabotage super-effect duration
EffectDuration {
range = SpaceTime
player = Self
// which effect's duration is this scaling
effect = "SabotageBuilding"
scale = 1.25
}
EffectDuration {
range = SpaceTime
player = Self
// which effect's duration is this scaling
effect = "ImprovedSabotageBuilding"
scale = 1.25
}
EffectSpeed {
range = Global
mask = Spies
player = Self
// 25% faster
scale = 1.25
}
EffectMaxHitPoints {
range = Global
mask = Spies
player = Self
// 25% more hit points
scale = 1.25
}
EffectVisualGlow {
range = Global
mask = Spies
player = Self
GlowType = Good
OwnerOnly = true
Icon = icon_crown_superspies_s
Tooltip = text_carea_sprspies_name
VTooltip = vtt_power_unitinfo_SuperSpies
}
EffectIsACrown {
range = Global
mask = Spies
player = Self
crownType = kCrownType_Imperial
}
]
}
and I want to look for a pattern like this one:
<ANYTHING, EVEN NULL>//<ANYTHING, EVEN NULL><MyString><AnyThing, EVEN NULL>
For example for this:
<anything>//<anything>super<anything>
Which would yield this results:
// scale sabotage super-effect duration
What regex query would give me the wanted results?
Thanks in advance for your time and effort!
Edit:
I am using Effective File Search – http://www.sowsoft.com/search.htm
The standard regex wildcard is
.(for one character). Arbitrary repetition is represented by*. So this should do the trick for you:Depending on your regex engine you might be able/have to leave out the delimiters
~. Also, since.by default does not match line breaks, the second wildcard will always go to the end of the line and thesuperhas to appear on the same line as//.