Thanks James, It isn't a homework problem, I want to seek RegEx solution...I
know how to solve this by reading line by line and landing on the record.
I sincerely appreciate your help
XY*13*17*22*90 //This line has 22 and XY as a fixed value rest all are
variables so I am trying to come with a pattern
^XY*[0-9][0-9]...something like it...The only problem is * is making my LIFE
HELL I tried escaping but that isn't workn
XY*14*1*22*100
XY*15*37*22*52
TIA
James Curran said:
Hmmm... this sounds like a homework problem.....
If the is the *only* requirement (specifically, that is the *only* document
this will be used on), then
^X.*$
should be sufficent. (That's an "X", at the start of a line "^", followed
any character "." repeated any number of times "*" until the end of the
line "$")
--
--
Truth,
James Curran
[erstwhile VC++ MVP]
Home:
www.noveltheory.com Work:
www.njtheater.com
Blog:
www.honestillusion.com Day Job:
www.partsearch.com
Vai2000 said:
RegEx Help
Need RegEx for extracting the XY*13*17*22*90 from the given document.
...........
AB*1*1*12*9
XY*13*17*22*90
BS*1*1*4*9
...........
TIA