
Hi guys, I need an expression that takes a number and the pipe character 1234| The string must begin with a number so ab1123|xyz does not qualify. Thanks in advance. Java string utils not an option for now, has to be regex

Not quite sure if this is what you need but the following should capture only the first case unless I missed something: (^\d+\|$) On Wed, Apr 20, 2016 at 2:27 PM, Bwana Lawi via skunkworks < skunkworks@lists.my.co.ke> wrote:
Hi guys,
I need an expression that takes a number and the pipe character 1234| The string must begin with a number so ab1123|xyz does not qualify.
Thanks in advance. Java string utils not an option for now, has to be regex
_______________________________________________ skunkworks mailing list skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke
-- Regards Brian Ngure

/\d+\|/ On 4/20/16 2:27 PM, Bwana Lawi via skunkworks wrote:
Hi guys,
I need an expression that takes a number and the pipe character 1234| The string must begin with a number so ab1123|xyz does not qualify.
Thanks in advance. Java string utils not an option for now, has to be regex
_______________________________________________ skunkworks mailing list skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke

'/(^[0-9]+/|).*/' On Wed, Apr 20, 2016 at 2:27 PM, Bwana Lawi via skunkworks < skunkworks@lists.my.co.ke> wrote:
Hi guys,
I need an expression that takes a number and the pipe character 1234| The string must begin with a number so ab1123|xyz does not qualify.
Thanks in advance. Java string utils not an option for now, has to be regex
_______________________________________________ skunkworks mailing list skunkworks@lists.my.co.ke ------------ List info, subscribe/unsubscribe http://lists.my.co.ke/cgi-bin/mailman/listinfo/skunkworks ------------
Skunkworks Rules http://my.co.ke/phpbb/viewtopic.php?f=24&t=94 ------------ Other services @ http://my.co.ke

You can then use a number of online tools to test your Regex e.g. https://regex101.com/
participants (5)
-
Brian Ngure
-
Bwana Lawi
-
Evans Marindany
-
Ken Muturi
-
Michael Pedersen