Thanks for the reply, is working but the script print all matches on the range I only need the first match. is there additional to your script to work?, like in
Hi,
I want to be able to list all the names in a file which begin with a capital letter, but I don't want it to list words that begin a new sentence. Is there any way round this?
Thanks for your help. (1 Reply)
file1 contains:
this is a test
this is a test and only a test
this is another test
this is another test and only another only
i'd like my file to look like this:
this is a test.
this is a test and only a test.
this is another test.
this is another test and only another only. (6 Replies)
Hello friends,
I am looking for any sed/awk/python script that can identify the position of a character or word in a file. Well, I prefer sed. <space> is a tab space since I actually dont know how to make the forum editor display a space as such.
Sample text
-----------
... (3 Replies)
Hello All ,
i am a newbie in korn shell scripting trying to trim a sentence that is parsed into a variable . The format of the sentence has three words that are separated from other by a
" : " colon and "." period . Format of the sentence looks like
... (5 Replies)
Dear help!
I want to print
The number i is number i
let i=1 to 5
output
should be like
The number 1 is number 1
The number 2 is number 2
The number 3 is number 3
The number 4 is number 4
The number 5 is number 5
Would be gr8 if you mke this with awk
Thanks (7 Replies)
Hello All,
I have file names in a directory that ends this way
File Names in the directory
abc.log.1.txt
abc.log.2.txt
abc.log.3.txt
I want to print the 1, 2 and 3 in the file names as the first column in my output, and some contents of the files as second and fourth columns. I wrote... (3 Replies)
Hi all,
I have ot match sentence list and word list anf fetch similar words in a separate file
second file with 2 columns
So I want the output shuld be 2 columns like this (3 Replies)
I started venturing in learning the art of using AWK/GAWK and wanted to simply added a period from line #11 to line #28 or to the end of the file if there is data. So for example:
11 Centos.NM
12 dojo1
13 redhat.5.5.32Bit
14 redhat.6.2.64Bit... (5 Replies)
My file has the entries like below...
/dev/sds
/dev/sdak
/dev/sdbc
/dev/sdbu
I want to make the file like below
echo 1 > /sys/block/sds/device/rescan
echo 1 > /sys/block/sdak/device/rescan
echo 1 > /sys/block/sdbc/device/rescan
echo 1 > /sys/block/sdbu/device/rescan (2 Replies)
Discussion started by: saravanapandi
2 Replies
LEARN ABOUT PHP
messageformatter
MESSAGEFORMATTER(3) 1 MESSAGEFORMATTER(3)The MessageFormatter classINTRODUCTION
MessageFormatter is a concrete class that enables users to produce concatenated, language-neutral messages. The methods supplied in this
class are used to build all the messages that are seen by end users.
The MessageFormatter class assembles messages from various fragments (such as text fragments, numbers, and dates) supplied by the program.
Because of the MessageFormatter class, the program does not need to know the order of the fragments. The class uses the formatting specifi-
cations for the fragments to assemble them into a message that is contained in a single string within a resource bundle. For example, Mes-
sageFormatter enables you to print the phrase "Finished printing x out of y files..." in a manner that still allows for flexibility in
translation.
Previously, an end user message was created as a sentence and handled as a string. This procedure created problems for localizers because
the sentence structure, word order, number format and so on are very different from language to language. The language-neutral way to cre-
ate messages keeps each part of the message separate and provides keys to the data. Using these keys, the MessageFormatter class can con-
catenate the parts of the message, localize them, and display a well-formed string to the end user.
MessageFormatter takes a set of objects, formats them, and then inserts the formatted strings into the pattern at the appropriate places.
Choice formats can be used in conjunction with MessageFormatter to handle plurals, match numbers, and select from an array of items. Typi-
cally, the message format will come from resources and the arguments will be dynamically set at runtime.
CLASS SYNOPSIS
MessageFormatter
MessageFormatter
Methods
o public MessageFormatter::__construct (string $locale, string $pattern)
o publicstatic MessageFormatter MessageFormatter::create (string $locale, string $pattern)
o publicstatic string MessageFormatter::formatMessage (string $locale, string $pattern, array $args)
o public string MessageFormatter::format (array $args)
o public int MessageFormatter::getErrorCode (void )
o public string MessageFormatter::getErrorMessage (void )
o public string MessageFormatter::getLocale (void )
o public string MessageFormatter::getPattern (void )
o publicstatic array MessageFormatter::parseMessage (string $locale, string $pattern, string $source)
o public array MessageFormatter::parse (string $value)
o public bool MessageFormatter::setPattern (string $pattern)
SEE ALSO
o ICU formatting documentation
o ICU message formatting description
oICU message formatters
oICU choice formatters
PHP Documentation Group MESSAGEFORMATTER(3)