assuming "cat" is the pattern, string (regardless length)
asdadfcat4
I need to get 4
for eirtrjkkkcat678- I'd get 678
(in b-shell)
Thanks in advance!!! (4 Replies)
This is my first post, please be nice. I have tried to google and read different tutorials.
The task at hand is:
Input file input.txt (example)
abc123defhij-E-1234jslo
456ujs-W-abXjklp
From this file the task is to grep the -E- and -W- strings that are unique and write a new file... (5 Replies)
Hello,
let's start by giving you guys a few examples of the text:
"READ /TEXT123/ABC123"
"READ /TEXT123/ABC123/"
"READ TEXT123/ABC123"
"READ TEXT123/ABC123/"
"READ TEXT123/TEXT456/ABC123"
"READ /TEXT123/TEXT456/ABC123"
"READ /TEXT123/TEXT456/ABC123/"
TEXT and ABC can be and I... (5 Replies)
Hi
I have a piece of xml that has a pattern like this
<int>159</int><int>30</int>
I want to find this pattern but only substitute the second part of the pattern to {rid1}.
Is that possible in sed ?
Thanks.
---------- Post updated at 12:10 PM ---------- Previous update was at 12:01 PM... (11 Replies)
nautilus is not remembering my settings. I have done everything I can think of to get this to work. I have deleted .gconf, .gconfd, and .gnome2. I tried to start over fresh and that did not work either. What else can I do? (4 Replies)
Hi,
I have two files file1.txt and file2.txt. Please see the attachments.
In file2.txt (which actually is a diff output between two versions of file1.txt.), I extract the pattern corresponding to 1172c1172. Now ,In file1.txt I have to search for this pattern 1172c1172 and if found, I have to... (9 Replies)
I read about this guy who always had difficulty remembering his password so he changed his password to "incorrect".
Now when he tries to log in and it fails the system tells him "your password is incorrect". (2 Replies)
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
The intended result should be :
PDF converters
'empty line'
gpdftext and pdftotext?xml version="1.0"?>
xml:space="preserve"><note-content version="0.1" xmlns:/tomboy/link" xmlns:size="http://beatniksoftware.com/tomboy/size">PDF converters
gpdftext and pdftotext</note-content>... (9 Replies)
I have a file like below.
2018.07.01, Sunday
09:27 some text 123456789 0 21 0.06 0.07 0.00
2018.07.02, Monday
09:31 some text 123456789 1 41 0.26 0.32 0.00
09:39 some text 456789012 1 0.07 0.09 0.09
09:45 some text 932469494 1 55 0.29 0.36 0.00
16:49 some text 123456789 0 48 0.12 0.15 0.00... (9 Replies)
Discussion started by: father_7
9 Replies
LEARN ABOUT MOJAVE
xml::libxml::namespace5.18
XML::LibXML::Namespace(3) User Contributed Perl Documentation XML::LibXML::Namespace(3)NAME
XML::LibXML::Namespace - XML::LibXML Namespace Implementation
SYNOPSIS
use XML::LibXML;
# Only methods specific to Namespace nodes are listed here,
# see XML::LibXML::Node manpage for other methods
my $ns = XML::LibXML::Namespace->new($nsURI);
print $ns->nodeName();
print $ns->name();
$localname = $ns->getLocalName();
print $ns->getData();
print $ns->getValue();
print $ns->value();
$known_uri = $ns->getNamespaceURI();
$known_prefix = $ns->getPrefix();
$key = $ns->unique_key();
DESCRIPTION
Namespace nodes are returned by both $element->findnodes('namespace::foo') or by $node->getNamespaces().
The namespace node API is not part of any current DOM API, and so it is quite minimal. It should be noted that namespace nodes are not a
sub class of XML::LibXML::Node, however Namespace nodes act a lot like attribute nodes, and similarly named methods will return what you
would expect if you treated the namespace node as an attribute. Note that in order to fix several inconsistencies between the API and the
documentation, the behavior of some functions have been changed in 1.64.
METHODS
new
my $ns = XML::LibXML::Namespace->new($nsURI);
Creates a new Namespace node. Note that this is not a 'node' as an attribute or an element node. Therefore you can't do call all
XML::LibXML::Node Functions. All functions available for this node are listed below.
Optionally you can pass the prefix to the namespace constructor. If this second parameter is omitted you will create a so called
default namespace. Note, the newly created namespace is not bound to any document or node, therefore you should not expect it to be
available in an existing document.
declaredURI
Returns the URI for this namespace.
declaredPrefix
Returns the prefix for this namespace.
nodeName
print $ns->nodeName();
Returns "xmlns:prefix", where prefix is the prefix for this namespace.
name
print $ns->name();
Alias for nodeName()
getLocalName
$localname = $ns->getLocalName();
Returns the local name of this node as if it were an attribute, that is, the prefix associated with the namespace.
getData
print $ns->getData();
Returns the URI of the namespace, i.e. the value of this node as if it were an attribute.
getValue
print $ns->getValue();
Alias for getData()
value
print $ns->value();
Alias for getData()
getNamespaceURI
$known_uri = $ns->getNamespaceURI();
Returns the string "http://www.w3.org/2000/xmlns/"
getPrefix
$known_prefix = $ns->getPrefix();
Returns the string "xmlns"
unique_key
$key = $ns->unique_key();
This method returns a key guaranteed to be unique for this namespace, and to always be the same value for this namespace. Two namespace
objects return the same key if and only if they have the same prefix and the same URI. The returned key value is useful as a key in
hashes.
AUTHORS
Matt Sergeant, Christian Glahn, Petr Pajas
VERSION
2.0110
COPYRIGHT
2001-2007, AxKit.com Ltd.
2002-2006, Christian Glahn.
2006-2009, Petr Pajas.
LICENSE
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.18.2 2014-02-01 XML::LibXML::Namespace(3)