I have text in a variable as below:
4.1.6.1 Display of user roles and system versions
[4.01.070]
It must be possible for a user logged into a named XXXXXX project,
to have all user information and all granted user roles displayed in a simple way.
An example of the displayed information is displayed below:
User Name: XXXX
Full Name: XXXXX XXXX
e-Mail: XXXX@XXXXXX.com
Status: Active
Deactivation Date: 23 Marts 2028
Granted User Roles:
Test Case Author
Requirement Author
Release manager
Description:
Please note this user was trained in XXXXX in spring 1903.
[4.01.072]
When pressing the About button, the following information should be shown:
iAuthorize DLL version: [Major].[Minor].[Bug].[0]
Workflow Script version: [Major].[Minor].[Bug]
Std. Template version: [XXXXX VX or XXXXXX VX]
The HP XXXX XXXXX version should be the name of the item called "XXXXX Version" on the XXXXX project list.
In the above text i need to find how many times a specific pattern string "[x.xx.xx]" occured.
In above case 2 times they occurred.
1st one is [4.01.070] and second one is [4.01.072]
I want ouput, something like below:
2 occurences found:
1st occurence:
Name: 4.01.070 Content:
It must be possible for a user logged into a named XXXXXX project,
to have all user information and all granted user roles displayed in a simple way.
An example of the displayed information is displayed below:
User Name: XXXX
Full Name: XXXXX XXXX
e-Mail: XXXX@XXXXXX.com
Status: Active
Deactivation Date: 23 Marts 2028
Granted User Roles:
Test Case Author
Requirement Author
Release manager
Description:
Please note this user was trained in XXXXX in spring 1903.
2nd occurence:
Name: 4.01.072
Content:
When pressing the About button, the following information should be shown:
iAuthorize DLL version: [Major].[Minor].[Bug].[0]
Workflow Script version: [Major].[Minor].[Bug]
Std. Template version: [XXXXX VX or XXXXXX VX]
The HP XXXX XXXXX version should be the name of the item called "XXXXX Version" on the XXXXX project list.
Please advise.
Regards, Srihari