Number matching only grabs 1 digit|a2b|roy@wasystems.net|1222408715|a2b|xx|0|76.102.148.130|I'm not sure if this is a bug or if I should just approach it differently.<br /><br />Using<br />+ [*]#(a&#124;b&#124;c)<br />or<br />+ [*] #(a&#124;b&#124;c)<br /><br />If I input a 2 digit number, the first digit is sucked in by [*] and the second digit is given to #. &nbsp;I'm not sure if I could do an alternative like<br />+ [_]#(a&#124;b&#124;c)<br /><br />I'd like to be able to catch<br />asdf 11a<br /><br />as well as<br />11a<br /><br />and have 11 assigned to # in both cases. &nbsp;Is my possible alternative the solution? Is this considered a parsing error or is it operating as it should?<br />||||
Re: Number matching only grabs 1 digit|Kirsle|casey@cuvou.net|1222448326|Kirsle|xx|0|69.232.42.17|It looks like parts are missing from your post. &nbsp;:-?<br /><br />You didn't mean +[color=red]\n[/color]#(a&#124;b&#124;c) did you? cuz line breaks in the trigger like that without a ^ command doesn't work.<br /><br />[code]+ #(a&#124;b&#124;c)<br />- You matched it (#=&lt;star&gt;; letter=&lt;star2&gt;)<br /><br />You&gt; 1a<br />[0] Bot&gt; You matched it (#=1; letter=a)<br />You&gt; 11a<br />[1] Bot&gt; You matched it (#=11; letter=a)<br />You&gt; 12345b<br />[2] Bot&gt; You matched it (#=12345; letter=b)[/code]<br /><br />If you meant + *#(a&#124;b&#124;c)... the regexp becomes like this:<br /><br />[code]/^(.+?)(\d+)(a&#124;b&#124;c)$/[/code]<br /><br />and the only way it can return true is for at least one character to match (.+?), followed by one or more numbers followed by a, b, or c.<br /><br />[code]You&gt; 11a<br />[0] Bot&gt; You matched it (1; 1; a)<br />You&gt; asdf 11a<br />[1] Bot&gt; You matched it (asdf ; 11; a)[/code]<br /><br />So the first part would need to be an optional that doesn't also match a number.<br /><br />[code]+ [*]#(a&#124;b&#124;c)<br /><br />/^(?:(?:.*?))(\d+)(a&#124;b&#124;c)$/<br /><br />+ [_]#(a&#124;b&#124;c)<br /><br />/^(?:(?:\w+))(\d+)(a&#124;b&#124;c)$/[/code]||||
