10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello guys,
Here i am writing a script in bash to check for a valid URL from a file using regex
This is my input file
http://www.yahoo.commmmmm
http://www.google.com
https://www.gooogle.co
www.test6.co.in
www.gmail.com
www.google.co
htt://www.money.com
http://eeeess.google.com... (2 Replies)
Discussion started by: Meeran Rizvi
2 Replies
2. UNIX for Dummies Questions & Answers
Hi !
Before trying to write a code, is there any program or code that generates all the combinations of strings that simple awk regex can match.
By "simple regex" I mean let's say without "+", "*", and with a limited number of characters (e.g. from "1" to "5").
e.g:
input:
34?5
output:... (9 Replies)
Discussion started by: beca123456
9 Replies
3. Shell Programming and Scripting
How to match lines that don't contain a patern in regex it self, without using the -v option of grep? (15 Replies)
Discussion started by: vistastar
15 Replies
4. Shell Programming and Scripting
I am trying to grep the following line in a file using a bash shell:
(..)
admin1::14959::::::
(..)
It works with the following expression (as expected)
# cat file | grep ^*::
admin1::14959::::::
but it does not work with (not expected)
# cat /etc/shadow | grep ^+::
I assume the... (2 Replies)
Discussion started by: schms
2 Replies
5. UNIX for Dummies Questions & Answers
Hello,
I'm working on unix with grep (GNU grep) 2.5.1. I'm going through some of the newer regex syntax using Regular Expression Reference - Advanced Syntax a guide.
ls -aLl /bin | grep "\(x\)"
Which works, just highlights 'x' where ever, when ever.
I'm trying to to get (?:) to work but... (4 Replies)
Discussion started by: MykC
4 Replies
6. Shell Programming and Scripting
Hi all,
I am looking to create words from a sentence which adhere to a custom search pattern from my website:
Example:
! +! / += ~
where the terms ! = not, +! = AND NOT, += - and equals and ~ = can be like....
Now here is the issue...i want to split a sentence like the one above on... (1 Reply)
Discussion started by: muay_tb
1 Replies
7. Shell Programming and Scripting
I have got a question. How to do this? I mean AND expression in regex.
List all the files in current directory that do not contain the words use AND take.
Thx.:p (15 Replies)
Discussion started by: evilfreakz
15 Replies
8. Shell Programming and Scripting
Hi,
I need to do an exact find and replace (I don't want to use regular expressions because the input comes from user). I want to find a line that matches the user's input text and replace it with an empty string.
For example, let's say the user enters I love "Unix" and the contents of the... (2 Replies)
Discussion started by: srikanths
2 Replies
9. UNIX for Dummies Questions & Answers
Hello everybody,
I'd like to know how is it I should write a regex in unix to match a string not followed by another string (anywhere in the line).
To be more specific, I want to find lines where "drop table" is found, but not followed anywhere in the line by the character "&".
For... (3 Replies)
Discussion started by: mvalonso
3 Replies
10. UNIX for Dummies Questions & Answers
having a look on the regex site I saw that characters can be search using hex values
http://www.regular-expressions.info/characters.html
So I try to use it whith grep to find a è on a string (octal Decimal Hexa : 350 232 E8) but it doesn't work
E.g.
/usr/bin/echo '\0350' | egrep '\xE8'
... (0 Replies)
Discussion started by: solea
0 Replies