10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
Ilove unix and alwyas trying to to learn unix,but i am weak in using regular expressions.can you please give me a littel brief discription that how can i understand them and how to use .your response could lead a great hand in my unix love. (1 Reply)
Discussion started by: manoj attri
1 Replies
2. Shell Programming and Scripting
what elements does " /^/ " match?
I did the test which indicates that it matches single lowercase character like 'a','b' etc. and '1','2' etc.
But I really confused with that. Because, "/^abc/" matches strings like "abcedf" or "abcddddee".
So, what does caret ^ really mean?
Any response... (2 Replies)
Discussion started by: DavidHe
2 Replies
3. Shell Programming and Scripting
#!/usr/bin/perl
$word = "one last challenge";
if ( $word =~ /^(\w+).*\s(\w+)$/ )
{
print "$1";
print "\n";
print "$2";
}
The output shows that "$1" is with result one and "$2" is with result challenge. I am confused about how this pattern match expression works step by step. I... (8 Replies)
Discussion started by: DavidHe
8 Replies
4. UNIX for Dummies Questions & Answers
In regular expressions with grep(or egrep), ^ works if we want something in starting of line..but what if we write ^^^ or ^ for pattern matching??..Hope u all r familiar with regular expressions for pattern matching.. (1 Reply)
Discussion started by: aadi_uni
1 Replies
5. Shell Programming and Scripting
Hi,
In ksh, I am trying to compare folder names having -141- in it's name.
e.g.: 4567-141-8098 should match this expression '*-141-*'
but, -141-2354 should fail when compared with '*-141-*'
simlarly, abc should fail when compared with '*-141-*'
I tried multiple things but nevertheless,... (5 Replies)
Discussion started by: jidsh
5 Replies
6. Shell Programming and Scripting
Hi,
I'm trying to use sed to extract some text and assign it to a variable.
Can anyone provide me with some help? it would be much appreciated!
I"m looking to extract for example:
filename=/output/R34/2005_13_R34_C1042S_T83_CRFTXT_20081015.txt
I'm trying to extract the 1042... (9 Replies)
Discussion started by: jtung
9 Replies
7. UNIX for Advanced & Expert Users
Hi,
below is a piece of code written by my predecessor at work.
I'm kind of a newbie and am trying to figure out all the regular expressions in this piece of code.
It is really a tough time for me to figure out all the regular expressions.
Please shed some light on the regular expressions... (3 Replies)
Discussion started by: ramky79
3 Replies
8. UNIX for Dummies Questions & Answers
how to find for a file whose name has all characters in uppercase after 'project'?
I tried this:
find . -name 'project**.pdf'
./projectABC.pdf
./projectABC123.pdf
I want only ./projectABC.pdf
What is the regular expression that correponds to "all characters are capital"?
thanks (8 Replies)
Discussion started by: melanie_pfefer
8 Replies
9. Shell Programming and Scripting
Hello,
Let say I have a string with content "Free 100%". How can extract only "100" using ksh? I would this machanism to work if instead of "100" there is any kind of combination of numbers(ex. "32", "1238", "1"). I want to get only the digits.
I have written something like this:
... (4 Replies)
Discussion started by: whatever
4 Replies
10. Programming
How do I use the regular expressions in c++? (2 Replies)
Discussion started by: szzz
2 Replies