Hi,
I am having an issue capturing all the data I need in a
particular
postscript format.
The data information is broken down as follows:
The co-ordinates for the data xxxx (space) yyyy (space) the
letter 'M'
(space) and the data is in the brackets.
The next character after the closing bracket can either a
opening
square bracket ([) an 'S' or an end of line (This
determines that this
is valid data).
There are 3 different data format scenarios.
1. 400 767 M (Data I need to extract) -> suffix
characters [ or S or
eol
2. 400 767 M (data \\( I need to extract \\) with nested
brackets)S
The nested brackets will always be escaped with '\\'
3. 175 3303 M (t)S 188 3303 M (t)S 202 3303 M (p)S etc
which is all
on one line
The coordinates may not be the first characters on the line.
I have had some success with
[0-9]{1,4}\s[0-9]{1,4}\s[M]\s\(.*[^\\](?=\)(\z|S|\[
)) but this doesn't
handle data format 3 as it extracts the whole line rather
than breaking
it down to each data section.
The 2 critical issues I need to address are:
-Handling data format 3, which also include nested brackets
-Ensuring that other unwanted data is not captured that may
be in a
similar format but will not contain one of the 3 suffix
characters
mentioned above.
I am new to regular expressions and this is doing my head in
so your
time is appreciated I you can help me.
Regards
Rick
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Regex" group.
To post to this group, send email to regex googlegroups.com
To unsubscribe from this group, send email to
regex-unsubscribe googlegroups.com
For more options, visit this group at http://groups.go
ogle.com/group/regex
-~----------~----~----~----~------~----~------~--~---
|