Retrieve all matches of occurences of words


 
Thread Tools Search this Thread
Top Forums Web Development Retrieve all matches of occurences of words
# 1  
Old 07-09-2009
Retrieve all matches of occurences of words

Hi,

I have rows like this.

Code:
Retractor muscle (PRM) of Helix pomatia

Genetic characterization of a prm- mutant

Values of PRM data.

Expression pattern of prmt5 in adult fish.

PRMT-5 negatively regulates DNA

genetic fusions of prM-E protein

Methylation of Xilf3 by Xprmt1b alters its DNA.

protein arginine methyltransferase AtPRMT10

If user specifies "prm*" I want first 6 rows to be selected.

How to write a MySQL query such that first 6 rows are retrieved??

The output should be like this:

Code:
Retractor muscle (PRM) of Helix pomatia

Genetic characterization of a prm- mutant

Values of PRM data.

Expression pattern of prmt5 in adult fish.

PRMT-5 negatively regulates DNA

genetic fusions of prM-E protein

How to retrieve all the variations of prm (i.e if user specifies prm*)?

Any ideas???

How can i do this???

Regards
vanitha
# 2  
Old 07-15-2009
I would try using SELECT with LIKE '%x%' and LIMIT to the SQL query, for string comparisons you can check this: MySQL :: MySQL 6.0 Reference Manual :: 11.4.1 String Comparison Functions
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replace particular words in file based on if finds another words in that line

Hi All, I need one help to replace particular words in file based on if finds another words in that file . i.e. my self is peter@king. i am staying at north sydney. we all are peter@king. How to replace peter to sham if it finds @king in any line of that file. Please help me... (8 Replies)
Discussion started by: Rajib Podder
8 Replies

2. Shell Programming and Scripting

Search words in any quote position and then change the words

hi, i need to replace all words in any quote position and then need to change the words inside the file thousand of raw. textfile data : "Ninguno","Confirma","JuicioABC" "JuicioCOMP","Recurso","JuicioABC" "JuicioDELL","Nulidad","Nosino" "Solidade","JuicioEUR","Segundo" need... (1 Reply)
Discussion started by: benjietambling
1 Replies

3. UNIX for Dummies Questions & Answers

Replace the words in the file to the words that user type?

Hello, I would like to change my setting in a file to the setting that user input. For example, by default it is ONBOOT=ON When user key in "YES", it would be ONBOOT=YES -------------- This code only adds in the entire user input, but didn't replace it. How do i go about... (5 Replies)
Discussion started by: malfolozy
5 Replies

4. Shell Programming and Scripting

Gawk gensub, match capital words and lowercase words

Hi I have strings like these : Vengeance mitt Men Vengeance gloves Women Quatro Windstopper Etip gloves Quatro Windstopper Etip gloves Girls Thermobite hooded jacket Thermobite Triclimate snow jacket Boys Thermobite Triclimate snow jacket and I would like to get the lower case words at... (2 Replies)
Discussion started by: louisJ
2 Replies

5. Shell Programming and Scripting

How count the number of two words associated with the two words occurring in the file?

Hi , I need to count the number of errors associated with the two words occurring in the file. It's about counting the occurrences of the word "error" for where is the word "index.js". As such the command should look like. Please kindly help. I was trying: grep "error" log.txt | wc -l (1 Reply)
Discussion started by: jmarx
1 Replies

6. Shell Programming and Scripting

Compare 2 files and print matches and non-matches in separate files

Hi all, I have two files, chap.txt and complex.txt. chap.txt looks like this: a d l m r k complex.txt looks like this: a c d e l m n j a d l p q r c p r m ......... (7 Replies)
Discussion started by: AshwaniSharma09
7 Replies

7. Shell Programming and Scripting

How Not to Delete Words that matches a PATTERN

Hi, I have a test file name test.txt with its contents string 21345 qwee strinn strriin striin i need to delete all the words except the word STRING I used the command cat test.txt | sed 's/^..*$/**/g' but the output entries still contain strinn strriin striin. Plz Help me out.... (5 Replies)
Discussion started by: Ananth12
5 Replies

8. Shell Programming and Scripting

Shell script to find out words, replace them and count words

hello, i 'd like your help about a bash script which: 1. finds inside the html file (it is attached with my post) the code number of the Latest Stable Kernel, 2.finds the link which leads to the download location of the Latest Stable Kernel version, (the right link should lead to the file... (3 Replies)
Discussion started by: alex83
3 Replies

9. Shell Programming and Scripting

how to retrieve the word between 2 specific words with shell script

Hi, I have a file content like: : : <span class="ColorRed"> 1.23</span><br> : : the value 1.23 will be changed from time to time, and I want to use a shell script command, e.g grep or sed, to retrieve only the value, how to do it? Thanks! Victor (6 Replies)
Discussion started by: victorcheung
6 Replies

10. Shell Programming and Scripting

occurences of words

I have a string like this. $str="The astrocyte profile might contribute to the identification of possible therapies in profiles profiling and profiled als."; Lets consider for example: a)If user enters the term profile* it should highlight profile,profiles only. b)If user enters the... (3 Replies)
Discussion started by: vanitham
3 Replies
Login or Register to Ask a Question