Feed The Beast Wiki

Follow the Feed The Beast Wiki on Discord or Mastodon!

READ MORE

Feed The Beast Wiki
mNo edit summary
Jursamaj (talk | contribs)
(Solved the problem.)
Line 1: Line 1:
 
Any idea how to match a default attribute? This and related tables have a problem of leaving out whole columns that should be there, simply because the default doesn't show as an actual attribute. [[User:Jursamaj|Jursamaj]] ([[User talk:Jursamaj|talk]]) 14:47, 11 June 2017 (UTC)
 
Any idea how to match a default attribute? This and related tables have a problem of leaving out whole columns that should be there, simply because the default doesn't show as an actual attribute. [[User:Jursamaj|Jursamaj]] ([[User talk:Jursamaj|talk]]) 14:47, 11 June 2017 (UTC)
 
:Ping {{U|Chocohead}} [[User:Xbony2|-Xbony2]] ([[User talk:Xbony2|talk]]) 12:01, 12 June 2017 (UTC)
 
:Ping {{U|Chocohead}} [[User:Xbony2|-Xbony2]] ([[User talk:Xbony2|talk]]) 12:01, 12 June 2017 (UTC)
  +
OK, figured it out. instead of "includematch=,/saplings\s*=\s*Lower\s*/i", I use "includematch=,/(saplings\s*=\s*Lower\s*){{!}}(^((?!saplings)(.{{!}}\n))+$)/i". The 1st part in parentheses matches when somebody puts "saplings=Lower" in the tree definition, and the 2nd part matches when they don't put "saplings" at all. The "{{!}}" between makes either pattern work. [[User:Jursamaj|Jursamaj]] ([[User talk:Jursamaj|talk]]) 13:45, 17 June 2017 (UTC)

Revision as of 13:45, 17 June 2017

Any idea how to match a default attribute? This and related tables have a problem of leaving out whole columns that should be there, simply because the default doesn't show as an actual attribute. Jursamaj (talk) 14:47, 11 June 2017 (UTC)

Ping Chocohead -Xbony2 (talk) 12:01, 12 June 2017 (UTC)

OK, figured it out. instead of "includematch=,/saplings\s*=\s*Lower\s*/i", I use "includematch=,/(saplings\s*=\s*Lower\s*)|(^((?!saplings)(.|\n))+$)/i". The 1st part in parentheses matches when somebody puts "saplings=Lower" in the tree definition, and the 2nd part matches when they don't put "saplings" at all. The "|" between makes either pattern work. Jursamaj (talk) 13:45, 17 June 2017 (UTC)