Thursday 15 January 2015

Regex Need Help - Two Functions -


When I talk about RegEx and I'm facing some problems, try to draw information using it I am doing I have a VBS script which uses the following information and what I want is a regx function, to draw two lines.

Script output:

2012-02-19T00: 00: 00

242

Let me "2012-02-19TT 00: 00: 00 "and the second requires a function to hold" 242 ". If necessary, then I can format script's output to make things easier.

Any help would be greatly appreciated

For text codes such as < Code> 2012-02-19T00: 00: 00 , the following regx will do this:

  ^ \ d {4} - \ d {2} - \ d {2} t \ D {2}: \ d {2}: \ d {2} $   

The number, for the second string of 3 digits, does the following, although if you have more digits in your string So just change what you need to change it to {3} .

  ^ \ d {3} $   

I'm assuming that the wire will be in its line.

No comments:

Post a Comment