Regular expression
-
I need help with regular expression. I have some html code into a variable that is named xmlDoc. The code includes a table and there are some things there that I want to pick out with regex.
6
Prentice, Bob
340584305858
Logged out[Edit](javascript:doEditAgent("56746")),
[Delete](javascript:doRemoveAgent("56746", "fn1")),
[Log in](javascript:doLoginLogout("4", "56746","fn1"))In this code I want to pick out: 1. The name, "Prentice, Bob" 2. The status, "Logged out" 3. The content from doLoginLogout(), "4", "56746","fn1" How do I do this? There are five rows similar to this in the table that I need to do this on.
-
I need help with regular expression. I have some html code into a variable that is named xmlDoc. The code includes a table and there are some things there that I want to pick out with regex.
6
Prentice, Bob
340584305858
Logged out[Edit](javascript:doEditAgent("56746")),
[Delete](javascript:doRemoveAgent("56746", "fn1")),
[Log in](javascript:doLoginLogout("4", "56746","fn1"))In this code I want to pick out: 1. The name, "Prentice, Bob" 2. The status, "Logged out" 3. The content from doLoginLogout(), "4", "56746","fn1" How do I do this? There are five rows similar to this in the table that I need to do this on.
If you're asking about how to use Regexp in JavaScript, Google[^] can help you. If you're asking about the regexp string, ask here[^].
Excuse me for my improper grammar and typos. It's because English is my primary language, not my first language. My first languages are C# and Java. VB, ASP, JS, PHP and SQL are my second language. Indonesian came as my third language. My fourth language? I'm still creating it, I'll let you know when it's done! :-D
-
If you're asking about how to use Regexp in JavaScript, Google[^] can help you. If you're asking about the regexp string, ask here[^].
Excuse me for my improper grammar and typos. It's because English is my primary language, not my first language. My first languages are C# and Java. VB, ASP, JS, PHP and SQL are my second language. Indonesian came as my third language. My fourth language? I'm still creating it, I'll let you know when it's done! :-D
-
Using XPath might be a better idea to parse things out of an XML file. Just a thought. It may not apply to your application.