Sponsored Content
Full Discussion: Regexp
Top Forums Shell Programming and Scripting Regexp Post 302909583 by bbaker@copesan. on Thursday 17th of July 2014 04:51:28 PM
Old 07-17-2014
Code:
\s-\s(\d+\s\w+)

This gets me extremely close but I cant seem to figure out how to use "Building" as the anchor and skip everything in between.

thanks for your on going help

---------- Post updated at 02:51 PM ---------- Previous update was at 02:49 PM ----------

Forgot to state that the hyphen is not always there. But "Building:" is

Last edited by Scott; 07-17-2014 at 07:30 PM.. Reason: Code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

regexp

Hi guys, does anyone know how to test for a regular expression - i want to include it in a script to make sure the variable is a regexp cheers (1 Reply)
Discussion started by: penfold
1 Replies

2. Shell Programming and Scripting

perl regexp

What is the easiest way to get full address of *.jpg images from html file using perl? example: http://farm3.static.flickr.com/2397/2126443111_65a810004c.jpg (1 Reply)
Discussion started by: mirusnet
1 Replies

3. Shell Programming and Scripting

regexp help

I'd like to know if there is a catchall line for renaming the following patterns: s01e03 -> 01x03 s4e9 -> 04x09 s10e08 ->10x08 and possibly even: 318 -> 03x18 1002 ->10x02 if its the first 3 or first digit number in the string. thanks! (0 Replies)
Discussion started by: TinCanFury
0 Replies

4. Shell Programming and Scripting

Help with regexp

Hi there! I would like to know how to find and replace all numbers in a *.html file and make them bold. Any help will be appreciated! :) (7 Replies)
Discussion started by: agasamapetilon
7 Replies

5. UNIX for Dummies Questions & Answers

print the line immediately after a regexp; but regexp is a sentence

Good Day, Im new to scripting especially awk and sed. I just would like to ask help from you guys about a sed command that prints the line immediately after a regexp, but not the line containing the regexp. sed -n '/regexp/{n;p;}' filename What if my regexp is 3 word or a sentence. Im... (3 Replies)
Discussion started by: ownins
3 Replies

6. Shell Programming and Scripting

matching regexp

Hi, maybe it is stupid question, but is it possible to match expression like this ? : ... // ... ( there is "//" somewhere on the line and on the end of the line there ISN'T "*/" ) I've tried something like : (in SED) sed 's/\/\/' but I need "*/" not to be on the end of the line ...... (2 Replies)
Discussion started by: kolage
2 Replies

7. Shell Programming and Scripting

Regexp tip

Hello, I'm just starting working on it. I'd like to get a tip For istance if I have a file like: a b c d e f .... and I wanna get: 1a & 2b & 3c 0d & 8e & 4f ..... I would like to use sed and come up with a regular expression that works.... (3 Replies)
Discussion started by: Dedalus
3 Replies

8. Shell Programming and Scripting

Perl regexp help

Hi, I have file like below: 1|1212|34353|5fdf 6575||dfgdg sfsdf |afsf||4|aasfbc|~1213~~~~~ 1|1212|34353|5fdf 6575||dfgdg sfsdf |affsf| |4|abc|~rwarw~~asa~~~123~312313 1|1212|34353|5fdf 6575||dfgdg sfsdf |afasfs||4|aasfdbc|~564564~~~~ 1|1212|34353|5fdf 6575||dfgdg sfsdf... (1 Reply)
Discussion started by: sol_nov
1 Replies

9. Shell Programming and Scripting

A help in regexp and grep

I have test string value , something like the one below str='KUAMRJIT|GHOSH' If I type echo $str | grep -o -e '\|+' it doesnt give me anything . But on the contrary echo $str | grep -o -e '|' display the only one pipe character(|) thats there in the string above . The way I understood Unix... (8 Replies)
Discussion started by: kumarjt
8 Replies

10. What is on Your Mind?

A Regexp You Can Use Everywhere

¯\_(ツ)_/¯ bakunin (0 Replies)
Discussion started by: bakunin
0 Replies
PPIx::Regexp::Dumper(3pm)				User Contributed Perl Documentation				 PPIx::Regexp::Dumper(3pm)

NAME
PPIx::Regexp::Dumper - Dump the results of parsing regular expressions SYNOPSIS
use PPIx::Regexp::Dumper; PPIx::Regexp::Dumper->new( 'qr{foo}smx' ) ->print(); INHERITANCE
"PPIx::Regexp::Dumper" is a PPIx::Regexp::Support. "PPIx::Regexp::Dumper" has no descendants. DESCRIPTION
This class generates a formatted dump of a PPIx::Regexp::Element object (or any subclass thereof), a PPIx::Regexp::Tokenizer object, or a string that can be made into one of these. METHODS
This class provides the following public methods. Methods not documented here are private, and unsupported in the sense that the author reserves the right to change or remove them without notice. new my $dumper = PPIx::Regexp::Dumper->new( '/foo/', ordinal => 1, ); This static method instantiates the dumper. It takes the string, PPI::Element, PPIx::Regexp::Element, or PPIx::Regexp::Tokenizer to be dumped as the first argument. Optional further arguments may be passed as name/value pairs. The following options are recognized: default_modifiers array_reference This argument is a reference to a list of default modifiers to be applied to the statement being parsed. See PPIx::Regexp new() for the details. encoding name This argument is the name of the encoding of the regular expression. If specified, it is passed through to PPIx::Regexp->new(). It also causes an "Encode::encode" to be done on any parse content dumped. indent number This argument is the number of additional spaces to indent each level of the parse hierarchy. This is ignored if either the "test" or "tokens" argument is true. The default is 2. margin number This is the number of spaces to indent the top level of the parse hierarchy. This is ignored if the "test" argument is true. The default is zero. ordinal boolean If true, this option causes the "ordinal" values of PPIx::Regexp::Token::Literal objects to be dumped. perl_version boolean If true, this option causes the "perl_version_introduced" and "perl_version_removed" values associated with each object dumped to be displayed. significant boolean If true, this option causes only significant elements to be dumped. The default is false. test boolean If true, this option causes the output to be formatted as a regression test rather than as a straight dump. The output produced by asserting this option is explicitly undocumented, in the sense that the author reserves the right to change the generated output without notice of any kind. The default is false. tokens boolean If true, this option causes a dump of tokenizer output rather than of a full parse of the regular expression. This is forced true if the dump is of a PPIx::Regexp::Tokenizer. The default is false. trace number If greater than zero, this option causes a trace of the parse. This option is unsupported in the sense that the author reserves the right to change it without notice. The default is zero. verbose number If greater than zero, this option causes additional information to be given about the elements found. This option is unsupported in the sense that the author reserves the right to change it without notice. The default is zero. If the thing to be dumped was a string, unrecognized arguments are passed to "PPIx::Regexp::Tokenizer->new()". Otherwise they are ignored. list print map { "$_ " } $dumper->list(); This method produces an array containing the dump output, one line per element. The output has no left margin applied, and no newlines. print $dumper->print(); This method simply prints the result of "string" to standard out. string print $dumper->string(); This method adds left margin and newlines to the output of "list", concatenates the result into a single string, and returns that string. SUPPORT
Support is by the author. Please file bug reports at <http://rt.cpan.org>, or in electronic mail to the author. AUTHOR
Thomas R. Wyant, III wyant at cpan dot org COPYRIGHT AND LICENSE
Copyright (C) 2009-2012 by Thomas R. Wyant, III This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES. This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. perl v5.14.2 2012-06-06 PPIx::Regexp::Dumper(3pm)
All times are GMT -4. The time now is 11:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy