Sponsored Content
Top Forums Programming Merge two strings by overlapped region Post 302896500 by Corona688 on Monday 7th of April 2014 06:04:53 PM
Old 04-07-2014
C's library of string functions isn't especially powerful. Regular expressions aren't included either (though there is an extension, -lregex). There's better languages for that.
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

stack region

how can i determine that what percentage of stack region is currently is used? (i am using tru64 unix) (2 Replies)
Discussion started by: yakari
2 Replies

2. UNIX for Dummies Questions & Answers

Merge two strings not from files

str1="this oracle data base record" str2="one two three four five" Output: this one oracle two data three base four record five str1 and str2 have the same column but they are not fixed columns. I can do it with "paste" but I do not want to create file everytime the script runs from... (2 Replies)
Discussion started by: buddyme
2 Replies

3. UNIX for Advanced & Expert Users

Best practice - determining what region you are on

Hello all, I have a question about what you think the best practice is to determine what region you are running on when you have a system setup with a DEV/TEST, QA, and PROD regions running the same scripts in all. So, when you run in DEV, you have a different directory structure, and you... (4 Replies)
Discussion started by: Rediranch
4 Replies

4. Shell Programming and Scripting

Region between lines

How can I find the regions between specific lines? I have a file which contains lines like this: chr1 0 17388 0 chr1 17388 17444 1 chr1 17444 17599 2 chr1 17599 17601 1 chr1 17601 569791 0 chr1 569791 569795 1 chr1 569795 569808 2 chr1 569808 569890 3 chr1 569890 570047 4 ... (9 Replies)
Discussion started by: linseyr
9 Replies

5. UNIX for Dummies Questions & Answers

overlapped genomic coordinates

Hi, I would like to know how can I get the ID of a feature if its genomic coordinates overlap the coordinates of another file. Example: Get the 4th column (ID) of this file1: chr1 10 100 gene1 chr2 3000 5000 gene2 chr3 200 1500 gene3 if it overlaps with a feature in this file2: chr2... (1 Reply)
Discussion started by: fadista
1 Replies

6. AIX

Change lv REGION in HDISK1

Dears my rootvg is missed up i can not extend the /opt as soon as i try to extend the Filesystem its give me that there is not enough space . as there any way to change the REGION of the LVs in HDISK1 ? lspv -p hdisk0 hdisk0: PP RANGE STATE REGION LV NAME TYPE ... (8 Replies)
Discussion started by: thecobra151
8 Replies

7. Shell Programming and Scripting

Merge left hand strings mapping to different right hand strings

Hello, I am working on an Urdu to Hindi dictionary which has the following structure: a=b a=c n=d n=q and so on. i.e. Headword separated from gloss by a = I am giving below a live sample بتا=बता بتا=बित्ता بتا=बुत्ता بتان=बतान بتان=बितान بتانا=बिताना I need the following... (3 Replies)
Discussion started by: gimley
3 Replies

8. Programming

Perl script to merge cells in column1 which has same strings, for all sheets in a excel workbook

Perl script to merge cells ---------- Post updated at 12:59 AM ---------- Previous update was at 12:54 AM ---------- I am using below code to read files from a dir and print to excel. open(my $in, '<', $file) or die "Could not open file: $!"; my $rowCount = 0; my $colCount = 0;... (11 Replies)
Discussion started by: Jack_Bruce
11 Replies

9. Shell Programming and Scripting

Merge strings from a file into a template

I am preparing a morphological grammar of Marathi to be placed in open-source. I have two files. The first file called Adverbs contains a whole list of words, one word per line A sample is given below: आधी इतक इतपत उलट एवढ ऐवजी कड कडनं कडल कडील कडून कडे करता करिता खाल (2 Replies)
Discussion started by: gimley
2 Replies

10. Shell Programming and Scripting

Merge strings with ignore case

I have a bi-lingual database of a large number of dictionaries. It so happens that in some a given string is in upper case and in others it is in lower case. An example will illustrate the issue. toll Tax=पथ-कर Toll tax=राहदारी कर toll tax=टोल I want to treat all three instances of toll tax... (3 Replies)
Discussion started by: gimley
3 Replies
vgrindefs(5)						Standards, Environments, and Macros					      vgrindefs(5)

NAME
vgrindefs - vgrind's language definition data base SYNOPSIS
/usr/lib/vgrindefs DESCRIPTION
vgrindefs contains all language definitions for vgrind(1). Capabilities in vgrindefs are of two types: Boolean capabilities which indicate that the language has some particular feature and string capabilities which give a regular expression or keyword list. Entries may continue onto multiple lines by giving a as the last character of a line. Lines starting with # are comments. Capabilities The following table names and describes each capability. +-------+---------+--------------------------------------------+ |Name | Type |Description | +-------+---------+--------------------------------------------+ |ab | str |Regular expression for the start of an | | | |alternate form comment | +-------+---------+--------------------------------------------+ |ae | str |Regular expression for the end of an alter- | | | |nate form comment | +-------+---------+--------------------------------------------+ |bb | str |Regular expression for the start of a block | +-------+---------+--------------------------------------------+ |be | str |Regular expression for the end of a lexical | | | |block | +-------+---------+--------------------------------------------+ |cb | str |Regular expression for the start of a com- | | | |ment | +-------+---------+--------------------------------------------+ |ce | str |Regular expression for the end of a comment | +-------+---------+--------------------------------------------+ |id | str |String giving characters other than letters | | | |and digits that may legally occur in iden- | | | |tifiers (default `_') | +-------+---------+--------------------------------------------+ |kw | str |A list of keywords separated by spaces | +-------+---------+--------------------------------------------+ |lb | str |Regular expression for the start of a char- | | | |acter constant | +-------+---------+--------------------------------------------+ |le | str |Regular expression for the end of a charac- | | | |ter constant | +-------+---------+--------------------------------------------+ |oc | bool |Present means upper and lower case are | | | |equivalent | +-------+---------+--------------------------------------------+ |pb | str |Regular expression for start of a procedure | +-------+---------+--------------------------------------------+ |pl | bool |Procedure definitions are constrained to | | | |the lexical level matched by the `px' capa- | | | |bility | +-------+---------+--------------------------------------------+ |px | str |A match for this regular expression indi- | | | |cates that procedure definitions may occur | | | |at the next lexical level. Useful for lisp- | | | |like languages in which procedure defini- | | | |tions occur as subexpressions of defuns. | +-------+---------+--------------------------------------------+ |sb | str |Regular expression for the start of a | | | |string | +-------+---------+--------------------------------------------+ |se | str |Regular expression for the end of a string | +-------+---------+--------------------------------------------+ |tc | str |Use the named entry as a continuation of | | | |this one | +-------+---------+--------------------------------------------+ |tl | bool |Present means procedures are only defined | | | |at the top lexical level | +-------+---------+--------------------------------------------+ Regular Expressions vgrindefs uses regular expressions similar to those of ex(1) and lex(1). The characters `^', `$', `:', and `' are reserved characters and must be `quoted' with a preceding if they are to be included as normal characters. The metasymbols and their meanings are: $ The end of a line ^ The beginning of a line d A delimiter (space, tab, newline, start of line) a Matches any string of symbols (like `.*' in lex) p Matches any identifier. In a procedure definition (the `pb' capability) the string that matches this symbol is used as the procedure name. () Grouping | Alternation ? Last item is optional e Preceding any string means that the string will not match an input string if the input string is preceded by an escape character (). This is typically used for languages (like C) that can include the string delimiter in a string by escaping it. Unlike other regular expressions in the system, these match words and not characters. Hence something like `(tramp|steamer)flies?' would match `tramp', `steamer', `trampflies', or `steamerflies'. Contrary to some forms of regular expressions, vgrindef alternation binds very tightly. Grouping parentheses are likely to be necessary in expressions involving alternation. Keyword List The keyword list is just a list of keywords in the language separated by spaces. If the `oc' boolean is specified, indicating that upper and lower case are equivalent, then all the keywords should be specified in lower case. EXAMPLES
Example 1: A sample program. The following entry, which describes the C language, is typical of a language entry. C|c|the C programming language: :pb=^d?*?d?pd?(a?)(d|{):bb={:be=}:cb=/*:ce=*/:sb=":se=e": :le=e':tl: :kw=asm auto break case char continue default do double else enum extern float for fortran goto if int long register return short sizeof static struct switch typedef union unsigned void while #define #else #endif #if #ifdef #ifndef #include #undef # define endif ifdef ifndef include undef defined: Note that the first field is just the language name (and any variants of it). Thus the C language could be specified to vgrind(1) as `c' or `C'. FILES
/usr/lib/vgrindefs file containing vgrind descriptions SEE ALSO
ex(1), lex(1), troff(1), vgrind(1) SunOS 5.10 10 Aug 1994 vgrindefs(5)
All times are GMT -4. The time now is 06:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy