From 7ef367fcdc326e12f5f02c3bc7bb6aec5cfaa608 Mon Sep 17 00:00:00 2001 From: ivazin Date: Sun, 3 Apr 2022 20:13:13 +0100 Subject: [PATCH] Update common.rs Updated for numeric only tickers --- src/broker_statement/ib/common.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/broker_statement/ib/common.rs b/src/broker_statement/ib/common.rs index 1cd78a70..c667c8b2 100644 --- a/src/broker_statement/ib/common.rs +++ b/src/broker_statement/ib/common.rs @@ -14,7 +14,8 @@ use crate::time; use crate::types::{Date, DateTime, Decimal}; use crate::util::{self, DecimalRestrictions}; -pub const STOCK_SYMBOL_REGEX: &str = "[A-Z][A-Z0-9]*(?:[ .][A-Z]+)??"; +// pub const STOCK_SYMBOL_REGEX: &str = "[A-Z][A-Z0-9]*(?:[ .][A-Z]+)??"; +pub const STOCK_SYMBOL_REGEX: &str = "[a-zA-Z0-9]+(?:[ .][A-Z]+)??"; pub const OLD_SYMBOL_SUFFIX: &str = ".OLD"; // IB uses the following identifier types as security ID: @@ -286,4 +287,4 @@ mod tests { fn symbol_parsing(value: &str, expected: &str) { assert_eq!(parse_symbol(value).unwrap(), expected); } -} \ No newline at end of file +}