Allow common greek letters in passive regex

Adds common letters (µ and Ω) as prefix and unit

Fixes https://gitlab.com/kicad/code/kicad/issues/11289

(cherry picked from commit 15fe2f2fd0)
This commit is contained in:
Seth Hillbrand 2022-04-01 12:38:47 -07:00
parent 4719fdc9bf
commit 5d5a2f9270
1 changed files with 2 additions and 2 deletions

View File

@ -241,12 +241,12 @@ wxString NETLIST_EXPORTER_PSPICE::GetSpiceFieldDefVal( SPICE_FIELD aField, SCH_S
wxString value = aSymbol->GetField( VALUE_FIELD )->GetShownText();
// Is it a passive component?
if( aCtl & NET_ADJUST_PASSIVE_VALS && ( prim == 'C' || prim == 'L' || prim == 'R' ) )
if( ( aCtl & NET_ADJUST_PASSIVE_VALS ) && ( prim == 'C' || prim == 'L' || prim == 'R' ) )
{
// Regular expression to match common formats used for passive parts description
// (e.g. 100k, 2k3, 1 uF)
wxRegEx passiveVal(
"^([0-9\\. ]+)([fFpPnNuUmMkKgGtT]|M(e|E)(g|G))?([fFhH]|ohm)?([-1-9 ]*)$" );
wxT( "^([0-9\\. ]+)([fFpPnNuUmMkKgGtTμµ𝛍𝜇𝝁 ]|M(e|E)(g|G))?([fFhHΩΩ𝛀𝛺𝝮]|ohm)?([-1-9 ]*)$" ) );
if( passiveVal.Matches( value ) )
{