in reply to regex help
Put code and data within <code>...</code> tags so we can see what it really looks like. See "Writeup Formatting Tips" for further details. Furthermore, don't show part of the data and a narrative explaining other parts: show a representative sample of your data in its entirety. See "How do I post a question effectively?" for more details on this.
Guessing somewhat as to the real formatting, this code is possibly close to what you need:
#!/usr/bin/env perl use strict; use warnings; my $text = <<'EOD'; Service Location: 1234 n street ave, Some City, ST, 99999, US EOD $text =~ /Service Location:\s+(.*\S)\s*$/m; print "$1\n";
Output:
1234 n street ave, Some City, ST, 99999, US
-- Ken
|
|---|