Hello,
I have records like below that I want to remove any five characters from the end of the string before the double quotes unless it is only an asterik.
I don't care what the characters are, but I need to retain the double quotes after I remove them. Can you point me to some examples of how to accomplish this? Thank you.
I am writing a script to search PCL output and append more PCL data to the end accordingly.
I need to remove the last 88 bytes from the string.
I have searched for a few hours now and am coming up with nothing. I can't use head or tail because the PCL output is all on one line. awk crashes on... (3 Replies)
I need help to strip out the first two characters of the variable $FileName. Please help.
FileName=`find . -mtime +0 -name '*'`
Contents of variable $FileName:
./SRIZVI4.MCR_IDEAS_REPORT.LAST.052705.075405.csv
I want to strip out "./" and place the contents in another variable. How do I... (3 Replies)
Hello,
I need to delete the final few characters from a parameter leaving just the first few. However, the characters which need to remain will not always be a string of the same length.
For instance, the parameter will be passed as BN_HSBC_NTRS/hub_mth_ifce.sf. I only need the bit before the... (2 Replies)
Hi
I have a file which contains wrong XML, There are some garbage characters at the end of line that I want to get rid of. Example:
<request type="product" ><attributes><pair><name>q</name><value><!]></value></pair><pair><name>start</name><value>1</value></pair></attributes></request>�J ... (7 Replies)
Hello All,
I have an Expect script that ssh's to a remote server and runs some commands before exiting.
One of the commands I run is the "hostname" Command. After I run this command I save the output
using this line in the code below...
Basically it executes the hostname command, then I... (2 Replies)
Hi all.. I have several unique files that contain one thing in common, and that is acct#. For all files in the directory, I want to append the 10 characters following the word "ACCOUNT:" to the end of the filename.
for example:
I have file 111_123 that contains ACCOUNT:ABC1234567
The file... (5 Replies)
Hi,
I am trying to remove lines once a string is found till another string is found including the start string and end string. I want to basically grab all the lines starting with color (closing bracket). PS: The line after the closing bracket for color could be anything (currently 'more').... (1 Reply)
Hello.
The token is any printable characters between 2 " .
The token is unknown, but we know that it is between 2 "
Tok 1 : "1234x567"
Tok 2 : "A3b6+None"
Tok 3 : "A3b6!1234=@"
The ligne is :
Line 1 :
"9876xABCDE"Do you have any code fragments or data samples in your post
Line 2 : ... (3 Replies)
Hi,
So basically I have this file containing query output in seperated columns.
In particular column I have the below strings:
news
news-prio
I am trying to grep the string news without listing news-prio aswell.
I tried
grep "$MSG_TYPE" ,
grep -w "$MSG_TYPE" ,
grep... (4 Replies)
I have this fastq file:
@M04961:22:000000000-B5VGJ:1:1101:9280:7106 1:N:0:86
GGGGGGGGGGGGCATGAAAACATACAAACCGTCTTTCCAGAAATTGTTCCAAGTATCGGCAACAGCTTTATCAATACCATGAAAAATATCAACCACACCA
+test-1
GGGGGGGGGGGGGGGGGCCGGGGGFF,EDFFGEDFG,@DGGCGGEGGG7DCGGGF68CGFFFGGGG@CGDGFFDFEFEFF:30CGAFFDFEFF8CAF;;8... (10 Replies)
Discussion started by: Xterra
10 Replies
LEARN ABOUT DEBIAN
genlex
Genlex(3o) OCaml library Genlex(3o)NAME
Genlex - A generic lexical analyzer.
Module
Module Genlex
Documentation
Module Genlex
: sig end
A generic lexical analyzer.
This module implements a simple ``standard'' lexical analyzer, presented as a function from character streams to token streams. It imple-
ments roughly the lexical conventions of Caml, but is parameterized by the set of keywords of your language.
Example: a lexer suitable for a desk calculator is obtained by let lexer = make_lexer ["+";"-";"*";"/";"let";"="; ( ; ) ]
The associated parser would be a function from token stream to, for instance, int , and would have rules such as:
let parse_expr = parser [< 'Int n >] -> n | [< 'Kwd ( ; n = parse_expr; 'Kwd ) >] -> n | [< n1 = parse_expr; n2 = parse_remainder n1 >] ->
n2 and parse_remainder n1 = parser [< 'Kwd + ; n2 = parse_expr >] -> n1+n2 | ...
type token =
| Kwd of string
| Ident of string
| Int of int
| Float of float
| String of string
| Char of char
The type of tokens. The lexical classes are: Int and Float for integer and floating-point numbers; String for string literals, enclosed in
double quotes; Char for character literals, enclosed in single quotes; Ident for identifiers (either sequences of letters, digits, under-
scores and quotes, or sequences of ``operator characters'' such as + , * , etc); and Kwd for keywords (either identifiers or single ``spe-
cial characters'' such as ( , } , etc).
val make_lexer : string list -> char Stream.t -> token Stream.t
Construct the lexer function. The first argument is the list of keywords. An identifier s is returned as Kwd s if s belongs to this list,
and as Ident s otherwise. A special character s is returned as Kwd s if s belongs to this list, and cause a lexical error (exception
Parse_error ) otherwise. Blanks and newlines are skipped. Comments delimited by (* and *) are skipped as well, and can be nested.
OCamldoc 2012-06-26 Genlex(3o)