<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://addonstudio.org/mw1/index.php?action=history&amp;feed=atom&amp;title=WoW%3AUSERAPI_strfindt</id>
	<title>WoW:USERAPI strfindt - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://addonstudio.org/mw1/index.php?action=history&amp;feed=atom&amp;title=WoW%3AUSERAPI_strfindt"/>
	<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:USERAPI_strfindt&amp;action=history"/>
	<updated>2026-05-22T15:14:15Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://addonstudio.org/mw1/index.php?title=WoW:USERAPI_strfindt&amp;diff=14872&amp;oldid=prev</id>
		<title>Move page script: Move page script moved page USERAPI strfindt to WoW:USERAPI strfindt without leaving a redirect</title>
		<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:USERAPI_strfindt&amp;diff=14872&amp;oldid=prev"/>
		<updated>2023-08-15T04:49:14Z</updated>

		<summary type="html">&lt;p&gt;Move page script moved page &lt;a href=&quot;/wiki/WoW:USERAPI_strfindt&quot; title=&quot;WoW:USERAPI strfindt&quot;&gt;USERAPI strfindt&lt;/a&gt; to &lt;a href=&quot;/wiki/WoW:USERAPI_strfindt&quot; title=&quot;WoW:USERAPI strfindt&quot;&gt;USERAPI strfindt&lt;/a&gt; without leaving a redirect&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 04:49, 15 August 2023&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key addonstu_asmw2:diff::1.12:old-14871:rev-14872 --&gt;
&lt;/table&gt;</summary>
		<author><name>Move page script</name></author>
	</entry>
	<entry>
		<id>https://addonstudio.org/mw1/index.php?title=WoW:USERAPI_strfindt&amp;diff=14871&amp;oldid=prev</id>
		<title>WoWWiki&gt;Charibot: catfix</title>
		<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:USERAPI_strfindt&amp;diff=14871&amp;oldid=prev"/>
		<updated>2008-07-09T00:44:00Z</updated>

		<summary type="html">&lt;p&gt;catfix&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:44, 9 July 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l55&quot;&gt;Line 55:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 55:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;__NOTOC__&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;__NOTOC__&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:User &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Defined Functions&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:User &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;defined functions&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key addonstu_asmw2:diff::1.12:old-14870:rev-14871 --&gt;
&lt;/table&gt;</summary>
		<author><name>WoWWiki&gt;Charibot</name></author>
	</entry>
	<entry>
		<id>https://addonstudio.org/mw1/index.php?title=WoW:USERAPI_strfindt&amp;diff=14870&amp;oldid=prev</id>
		<title>WoWWiki&gt;Mikk at 16:22, 9 June 2006</title>
		<link rel="alternate" type="text/html" href="https://addonstudio.org/mw1/index.php?title=WoW:USERAPI_strfindt&amp;diff=14870&amp;oldid=prev"/>
		<updated>2006-06-09T16:22:01Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{userfunc}} &amp;lt;!-- Leave this line in! --&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;&amp;#039;&amp;#039;&amp;#039;strfindt&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;- by [[user:Mikk|Mikk]] -&amp;#039;&amp;#039;&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Describe the purpose of the function(s), exhausting detail can be saved for a later section --&amp;gt;&lt;br /&gt;
A thin wrapper for [[API strfind|strfind]] that returns the results as a table, allowing it to be used in e.g. if() clauses while capturing subexpressions.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- List return values and arguments as well as function name(s), follow Blizzard usage convention for args --&amp;gt;&lt;br /&gt;
 nBeginPos, nEndPos = &amp;#039;&amp;#039;&amp;amp;lt;PREFIX&amp;amp;gt;&amp;#039;&amp;#039;_strfindt(tableCaptures, strHaystack, strRegex, nStartPos, boolPlain)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Function Parameters ==&lt;br /&gt;
&amp;lt;!-- If you are listing several functions, you&amp;#039;ll need to have several of these, e.g. &amp;quot;Foo Parameters&amp;quot;, &amp;quot;Bar Parameters&amp;quot;,... --&amp;gt;&lt;br /&gt;
=== Arguments ===&lt;br /&gt;
&amp;lt;!-- List each argument, together with its type --&amp;gt;&lt;br /&gt;
:(tableCaptures, strHaystack, strRegex, nStartPos, boolPlain)&lt;br /&gt;
&lt;br /&gt;
:;tableCaptures : &amp;#039;&amp;#039;&amp;#039;output&amp;#039;&amp;#039;&amp;#039; Table - captured subexpressions&lt;br /&gt;
&amp;lt;small&amp;gt;(identical to [[API strfind|strfind]]() after this point)&amp;lt;/small&amp;gt;&lt;br /&gt;
:;strHaystack : String - the string to perform the search in&lt;br /&gt;
:;strRegex : String - the regular expression (search pattern)&lt;br /&gt;
:;nStartPos : Number - the position to begin the search on (nil = from the beginning)&lt;br /&gt;
:;boolPlain : Boolean - set to &amp;#039;&amp;#039;true&amp;#039;&amp;#039; to not use regexes (which defeats the whole purpose of this wrapper)&lt;br /&gt;
&lt;br /&gt;
=== Returns ===&lt;br /&gt;
&amp;lt;!-- List each return value, together with its type --&amp;gt;&lt;br /&gt;
:nBegin, nEnd&lt;br /&gt;
&lt;br /&gt;
:;nBeginPos : Number - beginning of match (1-based) or nil for no match&lt;br /&gt;
:;nEndPos: String - end position of match&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
  local results = {};&lt;br /&gt;
  if(&amp;#039;&amp;#039;&amp;amp;lt;PREFIX&amp;amp;gt;&amp;#039;&amp;#039;_strfindt(results, &lt;br /&gt;
    &amp;#039;&amp;amp;lt;b&amp;gt;&amp;amp;lt;a href=&amp;quot;wowwiki.com&amp;quot;&amp;gt;WoWWiki&amp;amp;lt;/a&amp;gt;&amp;#039;, &lt;br /&gt;
    &amp;#039;&amp;amp;lt;a [^&amp;gt;]*%fhref=&amp;quot;([^&amp;quot;]*)&amp;quot;[^&amp;gt;]&amp;gt;([^&amp;lt;])+&amp;amp;lt;/a&amp;gt;&amp;#039;)&lt;br /&gt;
  then&lt;br /&gt;
    print results[2] . &amp;quot; lives at &amp;quot; . results[1];&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Result====&lt;br /&gt;
  WoWWiki lives at wowwiki.com&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
  -- Returns: nBeginPos, nEndPos.  Captured expressions go in tOut&lt;br /&gt;
  function &amp;#039;&amp;#039;&amp;amp;lt;PREFIX&amp;amp;gt;&amp;#039;&amp;#039;_strfindt(tOut, strFind, strRegex, nStart, bPlain)&lt;br /&gt;
    local a = { string.find(strFind, strRegex, nStart, bPlain) };&lt;br /&gt;
    while(getn(tOut)&amp;gt;0) do tremove(tOut,1); end&lt;br /&gt;
    for _,v in a do&lt;br /&gt;
      tinsert(tOut, v);&lt;br /&gt;
    end&lt;br /&gt;
    return a[1], a[2];&lt;br /&gt;
  end  &lt;br /&gt;
&lt;br /&gt;
__NOTOC__&lt;br /&gt;
[[Category:User Defined Functions]]&lt;/div&gt;</summary>
		<author><name>WoWWiki&gt;Mikk</name></author>
	</entry>
</feed>