use strict;
my $str = '(SU 08624476) Shrewton 5b; Mutilated, diameter approx. 20 paces, height approx 3\'. (1)
SU 08624475: Shrewton 5b; site only, diameter 22m, plotted from AP at 1:2500 (2,3)
Barrow, no recorded excavations taken place. (4)
The cropmark remains of the Bronze Age bowl barrow described by the previous authorities were seen as a ring ditch with a diameter of 30m centred at SU 0862 4475. It was mapped at 1:10,000 scale as part of the RCHME: Salisbury Plain Training Area NMP Project, and subsequently revised for the English Heritage Stonehenge WHS Mapping Project. This barrow was recorded collectively with four other barrows in NMR record SU04SE 31 as a barrow cemetery. Eight further barrows from the eastern end of the same cemetery lie immediately to the south of the modern road. These have been recorded separately in NMR record SU04SE 26. (5)
1
VIRTUAL CATALOGUE ENTRY TO SUPPORT NAR MIGRATION
VCH Wilts 1, 1957, 190 (L.V Grinsell)
2
Aerial photograph
AP (Crawford Collection 1097, undated)
3
Field Investigators Comments
F1 PAS 21-Nov-1974
4
VIRTUAL CATALOGUE ENTRY TO SUPPORT NAR MIGRATION
Proc. Prehistoric Soc. 50, 1984, 257 (C. Green, S. Rollo-Smith)
5
VIRTUAL CATALOGUE ENTRY TO SUPPORT NAR MIGRATION
NMR OS/70067 218 03-MAY-1970
1
VIRTUAL CATALOGUE ENTRY TO SUPPORT NAR MIGRATION
VCH Wilts 1, 1957, 190 (L.V Grinsell)
2
Aerial photograph
AP (Crawford Collection 1097, undated)
3
Field Investigators Comments
F1 PAS 21-Nov-1974
4
VIRTUAL CATALOGUE ENTRY TO SUPPORT NAR MIGRATION
Proc. Prehistoric Soc. 50, 1984, 257 (C. Green, S. Rollo-Smith)
5
VIRTUAL CATALOGUE ENTRY TO SUPPORT NAR MIGRATION
NMR OS/70067 218 03-MAY-1970
';
my $regex = qr/[+-]?([0-9]+([.][0-9]*)?|[.][0-9]+)(?=')/p;
if ( $str =~ /$regex/g ) {
print "Whole match is ${^MATCH} and its start/end positions can be obtained via \$-[0] and \$+[0]\n";
# print "Capture Group 1 is $1 and its start/end positions can be obtained via \$-[1] and \$+[1]\n";
# print "Capture Group 2 is $2 ... and so on\n";
}
# ${^POSTMATCH} and ${^PREMATCH} are also available with the use of '/p'
# Named capture groups can be called via $+{name}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Perl, please visit: http://perldoc.perl.org/perlre.html