LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 06:06 AM   #1
validator456
Member
 
Registered: Apr 2013
Location: Rotterdam, The Netherlands
Distribution: Crunchbang Linux
Posts: 234

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, 07:39 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

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

[^>] means "match any character that is not a >"
 
Old 04-08-2014, 09:33 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,930

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


Reply

Tags
regex, script



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 02:56 PM
[SOLVED] Bash Script - Check Argument with REGEX mrm5102 Programming 9 04-10-2012 10: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 01:10 AM
Privoxy -- understanding regex replacement Phieth6o Linux - Software 1 06-27-2009 05:31 AM
performing regex on shell script variable? ocicat Programming 3 07-17-2007 02:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:48 PM.

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
Open Source Consulting | Domain Registration