Quote:
Originally Posted by skil-phil
Hi,
I posted a thread a while ago and cannot find it
If this a duplicate I apologize.
I have been getting started with regex expressions using a tutorial I found on these forums.
Finding number sequences work fine.
Number and alpha give me a problem.
Trying to get a match for:
<body class="content" id="uiW9njI8qPGOt6Hp7wdrNu5">
with variable alpha and numerics.
Tried
<body class="content" id="[a-z][A-Z][0-9]">
<body class="content" id="[a-zA-Z0-9]">
<body class="content" id="\w">
None of witch found a match.
What am I missing?
Thanks
Phil
|
Since you're working through a tutorial, this might not be what you're looking for. But, my search for <body> tags with stuff in them is simply:
If I were to look for something of the form you specified, then I'd try:
Code:
<body class=.+? id=.+?>
or, since the class seems fixed:
Code:
<body class="content" id=.+?>
EDIT: From:
https://regex101.com/
Quote:
. matches any character (except for line terminators)
+? matches the previous token between one and unlimited times, as few times as possible, expanding as needed (lazy)
|