I have following text pattern
(2222) First Last (ab-cd/ABC1), <[email protected]> 1224: efadsfadsfdsf
(3333) First Last (abcd/ABC12), <[email protected]> 1234, 4657: efadsfadsfdsf
I want the number 1224 or 1234, 4657 from the above text after the text >.
I have this
\((\d+)\)\s\w*\s\w*\s\(\w*\/\w+\d*\),\s<\w*\.\w*\@\w*\.domain.com>\s\d+:
which will take the text before : But i want the one after email till :
Is there any easy regular expression to do this? or should I use split and do this
Thanks
Edit: The whole text is returned by a command line tool.
(3333) First Last (abcd/ABC12), <[email protected]> 1234, 4657: efadsfadsfdsf
(3333) - Unique ID
First Last - First and last names
<[email protected]> - Email address in format [email protected]
1234, 4567 - database primary Keys
: xxxx - Headline
What I have to do is process the above and get hte database ID (in ex: 1234, 4567 2 separate ID's) and query the tables
The above is the output (like this I will get many entries) from the tool which I am calling via my Perl script.
My idea was to use a regular expression to get the database id's. Guess I could use regular expression for this
1234, we can't tell which one you mean. Also you say you want1234or1234, 4657, which is a bit odd; I suspect you can get whatever you want, but you need to be clear about it.