From 5d5a2f9270e60742b1a6e19b4790b2c7561f2319 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Fri, 1 Apr 2022 12:38:47 -0700 Subject: [PATCH] Allow common greek letters in passive regex MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds common letters (µ and Ω) as prefix and unit Fixes https://gitlab.com/kicad/code/kicad/issues/11289 (cherry picked from commit 15fe2f2fd0ee7bb578b0602cd80843f19c053fd9) --- eeschema/netlist_exporters/netlist_exporter_pspice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eeschema/netlist_exporters/netlist_exporter_pspice.cpp b/eeschema/netlist_exporters/netlist_exporter_pspice.cpp index 5a61735dd7..ada27723cd 100644 --- a/eeschema/netlist_exporters/netlist_exporter_pspice.cpp +++ b/eeschema/netlist_exporters/netlist_exporter_pspice.cpp @@ -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 ) ) {