Hi,
I have sentences like this:
$sent=
Protein modeling studies reveal that the RG-rich region is part of a three to four strand antiparallel beta-sheet, which in other RNA binding protein functions as a platform for nucleic acid interactions.
Heterogeneous nuclear ribonucleoparticle... (19 Replies)
Hi all,
Is anyone able to help with the following query?
I have an input file with several lines of words, e.g.
"hellolaylahello"
"hellohellohellolayla"
I want to search for the exact string "hello" in each line and display:
2 "hellolaylahello"
3 "hellohellohellolayla"
I... (11 Replies)
I'm trying to find a exact word match but couldn't do it.
ABC
ABC_NE
Searching for ABC_NE tried
grep -w </ABC_NE/>
grep "^ABC_NE$"
but didn't worked , any awk variants would also help.
---------- Post updated at 08:40 AM ---------- Previous update was at 06:48 AM ----------
I... (2 Replies)
I am trying to match a pattern exactly in a shell script. I have tried two methods
awk '/\<mpath${CURR_MP}\>/{print $1 $2}' multipath
perl -ne '/\bmpath${CURR_MP}\b/ and print' /var/tmp/multipath
Both these methods require that I use the escape character. I am guessing that is why... (8 Replies)
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)
Hi friends,
i am using the following grep command for exact word match:
>echo "sachin#tendulkar" | grep -iw "sachin"
output: sachin#tendulkar
as we can see in the above example that its throwinng the exact match(which is not the case as the keyword is sachin and string is... (6 Replies)
I want to match exact string stored in Variable INO and print next two lines. I have written below code which partially matches:
awk '/\'$VAR'/{getline; getline; print}'
Will be thankful , if somebody can help in to resolve this problem.
Please view this code tag video for how to use... (9 Replies)
Hello,
I am writing a script in awk where I need to match a whole word that is stored inside a variable.
For example:
I am working on a text that looks like this, and I want to print the second row:
sfasfsomethingsfasf
this is something I can use
this is not somethingIcanuse
... (12 Replies)
Hi All,
My Input file contains a 1000’s of lines in which I have to replace a
a string to the other. Here the problem is, I have the lines in my Input as below.
Cable Yes && !Pay TV && !ADS
\noUE \Label="Cable Yes && !Pay TV && !ADS"
I want to replace exactly the string Cable Yes &&... (37 Replies)
I am trying to create a cronjob that will run on startup that will look at a list.txt file to see if there is a later version of a database using database.txt as the source. The matching lines are written to output.
$1 in database.txt will be in list.txt as a partial match. $2 of database.txt... (2 Replies)
Discussion started by: cmccabe
2 Replies
LEARN ABOUT PHP
mb_convert_case
MB_CONVERT_CASE(3) 1 MB_CONVERT_CASE(3)mb_convert_case - Perform case folding on a stringSYNOPSIS
string mb_convert_case (string $str, int $mode, [string $encoding = mb_internal_encoding()])
DESCRIPTION
Performs case folding on a string, converted in the way specified by $mode.
PARAMETERS
o $str
- The string being converted.
o $mode
- The mode of the conversion. It can be one of MB_CASE_UPPER, MB_CASE_LOWER, or MB_CASE_TITLE.
o $encoding
-The $encoding parameter is the character encoding. If it is omitted, the internal character encoding value will be used.
RETURN VALUES
A case folded version of $string converted in the way specified by $mode.
UNICODE
By contrast to the standard case folding functions such as strtolower(3) and strtoupper(3), case folding is performed on the basis of the
Unicode character properties. Thus the behaviour of this function is not affected by locale settings and it can convert any characters that
have 'alphabetic' property, such as A-umlaut (A).
For more information about the Unicode properties, please see http://www.unicode.org/unicode/reports/tr21/.
EXAMPLES
Example #1
mb_convert_case(3) example
<?php
$str = "mary had a Little lamb and she loved it so";
$str = mb_convert_case($str, MB_CASE_UPPER, "UTF-8");
echo $str; // Prints MARY HAD A LITTLE LAMB AND SHE LOVED IT SO
$str = mb_convert_case($str, MB_CASE_TITLE, "UTF-8");
echo $str; // Prints Mary Had A Little Lamb And She Loved It So
?>
Example #2
mb_convert_case(3) example with non-Latin UTF-8 text
<?php
$str = "Txiotn a
nE Baos unuvn yn, dpaokeCei unp vw0po kuvs";
$str = mb_convert_case($_tr, MB_CASE_UP_ER, "UTF_8"); _ _
echo $str; // Prints TXI>TH A/TTHH BAO> YHMNH | H, /PA>KE/EI YTTP NOOPO KYN>
$str = mb_convert_case($str, MB_CASE_TITLE, "U_F-8");
echo $str; // Prints Txiotn A
nE Baoo Ynuvn | n, /paokeCei Ynp Nw0po Kuvo
?>
SEE ALSO mb_strtolower(3), mb_strtoupper(3), strtolower(3), strtoupper(3), ucfirst(3), ucwords(3).
PHP Documentation Group MB_CONVERT_CASE(3)