LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-08-2014, 07:06 AM   #1
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 135

Rep: Reputation: Disabled
Understanding a regex-script


I had a problem and found the solution on the internet. Worked like a breeze.
Regex to match the first ending HTMl tag:
http://stackoverflow.com/questions/1...nding-html-tag.

But I find it difficult to understand the script.
Code:
<form[^>]*name="loginForm"[^>]*>[^~]*?</form>
Could someone please explain to me what the code means and especially the code:
Code:
[^>]
 
Old 04-08-2014, 08:39 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
http://www.regular-expressions.info/

[^>] means "match any character that is not a >"
 
Old 04-08-2014, 10:33 AM   #3
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,110

Rep: Reputation: 2268Reputation: 2268Reputation: 2268Reputation: 2268Reputation: 2268Reputation: 2268Reputation: 2268Reputation: 2268Reputation: 2268Reputation: 2268Reputation: 2268
http://www.myezapp.com/apps/dev/rege...E&env=env_perl
 
1 members found this post helpful.
  


Reply

Tags
regex, script


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Regex problem in script verona Linux - General 4 08-01-2012 03:56 PM
[SOLVED] Bash Script - Check Argument with REGEX mrm5102 Programming 9 04-10-2012 11:07 AM
[SOLVED] differences between shell regex and php regex and perl regex and javascript and mysql golden_boy615 Linux - General 2 04-19-2011 02:10 AM
Privoxy -- understanding regex replacement Phieth6o Linux - Software 1 06-27-2009 06:31 AM
performing regex on shell script variable? ocicat Programming 3 07-17-2007 03:10 PM


All times are GMT -5. The time now is 11:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration