Sponsored Content
Top Forums Shell Programming and Scripting What is the most widely used word anchor used in Regex? Post 302781549 by littlewenwen on Sunday 17th of March 2013 12:13:29 AM
Old 03-17-2013
What is the most widely used word anchor used in Regex?

Hello, All

I learned from book about word anchor "\<" and "\>"; however when I tested them, they seem to work only in grep.

Can anyone suggest word anchor that can be used in grep, awk, perl ...?
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

grep/egrep fails with $ anchor?

The $ seems to fail for me. I'm using GNU grep 2.5.4 (that is, nothing out of the ordinary, just what came with my distro) but I can't get the final anchor $ to work for me. (^ works as usual.) Behavior without anchor: $ /bin/grep -E 'tium' file tritium tertium quid Expected behavior: $... (2 Replies)
Discussion started by: CRGreathouse
2 Replies

2. Linux

SCEP and Trust Anchor

Hi Does anybody knows about the simple certificate enrollment protocol details ? if yes please provide me the details. And what is a trust anchor profile ? Thanks in advance. (0 Replies)
Discussion started by: chaitus.28
0 Replies

3. Shell Programming and Scripting

Extracting anchor text and its URL from HTML files in BASH

Hi All, I have some HTML files and my requirement is to extract all the anchor text words from the HTML files along with their URLs and store the result in a separate text file separated by space. For example, <a href="/kid/stay_healthy/">Staying Healthy</a> which has /kid/stay_healthy/ as... (3 Replies)
Discussion started by: shoaibjameel123
3 Replies

4. Shell Programming and Scripting

regex - start with a word but ignore that word

Hi Guys. I guess I have a very basic query but stuck with it :( I have a file in which I want to extract particular content. The content is between standard format like : Verify stats A=0 B=12 C=34 TEST Failed Now I want to extract data between "Verify stats" & "TEST Failed" but do... (6 Replies)
Discussion started by: ratneshnagori
6 Replies

5. Shell Programming and Scripting

Regex for word followed by another word

I want to find a regex command that I can run on the command line that will find a whole word followed by another whole word (that I specify in the command). What I am looking to do is also include a file extension (like .txt) in the command such that it only runs the regex on files with that... (6 Replies)
Discussion started by: jvsrvcs
6 Replies

6. UNIX for Dummies Questions & Answers

Find EXACT word in files, just the word: no prefix, no suffix, no 'similar', just the word

I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL. I need the whole word... (6 Replies)
Discussion started by: chicchan
6 Replies

7. Shell Programming and Scripting

Regex: Get the word before match

Hi Input: MYTEXT.aa.bb cc.MYTEXT.aa.bb ee.dd.cc.MYTEXT.aa.bb cc.NOTEXT.a.b Output: <empty> cc cc <empty> I would like to use a regex to extract the last word before MYTEXT without the dot (2 Replies)
Discussion started by: chitech
2 Replies

8. Shell Programming and Scripting

Regex to identify word in second position on a line

I am interested in finding a regex to find a word in second position on a line. The word in question is या I tried the following PERL EXPRESSION but it did not work: ] या or ^\W या But both gave Null results I am giving below a Sample file: देना या सौंपना=delegate तह जमना या... (8 Replies)
Discussion started by: gimley
8 Replies

9. Shell Programming and Scripting

Scan for anchor tags in Perl?

Hello all, I have some .html files on my hard drive and trying to figure out (if it's possible) how to scan the files in the directory for <a> anchor tags to find linked files. I know how to bring the files in with Perl, but as text. Wondering if there's a way to probe the file for... (2 Replies)
Discussion started by: sldsand
2 Replies
Tk_GetAnchorFromObj(3)					       Tk Library Procedures					    Tk_GetAnchorFromObj(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tk_GetAnchorFromObj, Tk_GetAnchor, Tk_NameOfAnchor - translate between strings and anchor positions SYNOPSIS
#include <tk.h> int Tk_GetAnchorFromObj(interp, objPtr, anchorPtr) int Tk_GetAnchor(interp, string, anchorPtr) const char * Tk_NameOfAnchor(anchor) ARGUMENTS
Tcl_Interp *interp (in) Interpreter to use for error reporting, or NULL. Tcl_Obj *objPtr (in/out) String value contains name of anchor point: "n", "ne", "e", "se", "s", "sw", "w", "nw", or "center"; internal rep will be modified to cache corresponding Tk_Anchor. const char *string (in) Same as objPtr except description of anchor point is passed as a string. int *anchorPtr (out) Pointer to location in which to store anchor position corresponding to objPtr or string. Tk_Anchor anchor (in) Anchor position, e.g. TCL_ANCHOR_CENTER. _________________________________________________________________ DESCRIPTION
Tk_GetAnchorFromObj places in *anchorPtr an anchor position (enumerated type Tk_Anchor) corresponding to objPtr's value. The result will be one of TK_ANCHOR_N, TK_ANCHOR_NE, TK_ANCHOR_E, TK_ANCHOR_SE, TK_ANCHOR_S, TK_ANCHOR_SW, TK_ANCHOR_W, TK_ANCHOR_NW, or TK_ANCHOR_CENTER. Anchor positions are typically used for indicating a point on an object that will be used to position the object, e.g. TK_ANCHOR_N means position the top center point of the object at a particular place. Under normal circumstances the return value is TCL_OK and interp is unused. If string does not contain a valid anchor position or an abbreviation of one of these names, TCL_ERROR is returned, *anchorPtr is unmodified, and an error message is stored in interp's result if interp is not NULL. Tk_GetAnchorFromObj caches information about the return value in objPtr, which speeds up future calls to Tk_GetAnchor- FromObj with the same objPtr. Tk_GetAnchor is identical to Tk_GetAnchorFromObj except that the description of the anchor is specified with a string instead of an object. This prevents Tk_GetAnchor from caching the return value, so Tk_GetAnchor is less efficient than Tk_GetAnchorFromObj. Tk_NameOfAnchor is the logical inverse of Tk_GetAnchor. Given an anchor position such as TK_ANCHOR_N it returns a statically-allocated string corresponding to anchor. If anchor is not a legal anchor value, then "unknown anchor position" is returned. KEYWORDS
anchor position Tk 8.1 Tk_GetAnchorFromObj(3)
All times are GMT -4. The time now is 03:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy